summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2017-09-18Move #ifdef HAVE_XRANDR in xrandr.cJérémie Courrèges-Anglas
- always build xrandr.c - provide stubs in xrandr.c; only init_xrandr() anc xrandr_fill_screen() are safe to call if XRandR support is not built in Code that wants to use XRandR outside xrandr.c should test rp_have_xrandr.
2017-09-17Shuffle some codeJérémie Courrèges-Anglas
2017-09-17Move utf8_locale setting in utf8.cJérémie Courrèges-Anglas
Less goo in main.c
2017-09-17Initialize utf8_locale in main(), it doesn't belong in defaults nowJérémie Courrèges-Anglas
2017-09-17Simplify ratpoison -c realloc loopJérémie Courrèges-Anglas
2017-09-17Move utf8_locale to its own fileJérémie Courrèges-Anglas
So that we can easily use it from tests.
2017-08-28Move several functions out of main.c into globals.cWill Storey
These functions are used in many parts of ratpoison. In order to compile a separate program using the ratpoison files, we need them available outside of main.c.
2017-08-28add onlyborder variableVasil Zlatanov
When onlyborder is set to 0 (default 1), borders are not displayed if there is only a single frame on a given screen. This is useful if you use (thick) coloured borders to show which is the currently focused window when using splits, but also don't want to have borders taking up space unnecessarily when running a fullscreen window. Signed-off-by: Vasil Zlatanov <v@skozl.com>
2017-02-15Merge branch 'xrandr'Jérémie Courrèges-Anglas
All the hard work on xrandr done by Mathieu OTHACEHE, thanks!
2016-12-08Select xrandr primary screen at startup if possibleMathieu OTHACEHE
If xrandr support is enabled and a screen is marked primary, use it as current screen at startup. Otherwise, use the first screen in sorted screen list as current screen at startup.
2016-12-08Simplify scanwins functionMathieu OTHACEHE
Use find_screen_by_attr function, remove screen argument and a useless debug message.
2016-11-23define HAVE_XRANDR/link with libXrandr when we actually want toJérémie Courrèges-Anglas
2016-11-23Keep frame undo/redo local to actions.cJérémie Courrèges-Anglas
2016-11-21Only use xrandr if Xrandr init succeedsJérémie Courrèges-Anglas
2016-11-17Add xrandr supportMathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
2016-06-12Simplify config file open checksJérémie Courrèges-Anglas
2016-06-12Read the system config even if the homedir can't be found.Jérémie Courrèges-Anglas
2016-06-12No need for getopt_long to return the index for long option parametersJérémie Courrèges-Anglas
2016-06-12Zero out struct sigaction instead of setting known fields.Jérémie Courrèges-Anglas
2016-06-12sigaction should always replace the signal handlerJérémie Courrèges-Anglas
The code is confusing, there is no reason to skip setting the handler if it is already set to SIG_IGN, especially now that SIG_IGN isn't used in ratpoison.
2016-06-12sigaction has other benefits than working on SVR4 systemsJérémie Courrèges-Anglas
2016-06-12Print a more readable error message if sigaction failsJérémie Courrèges-Anglas
2016-06-12set_sig_handler isn't used only for SIGALRMJérémie Courrèges-Anglas
2016-06-12Stop embedding build time, it makes builds less reproducible.Jérémie Courrèges-Anglas
2014-03-29Detect XKB support at build and runtime.Jérémie Courrèges-Anglas
2014-03-24read_startup_files doesn't mangle its argument.Jérémie Courrèges-Anglas
2014-03-24Don't dup args passed on the cli, we don't mangle them.Jérémie Courrèges-Anglas
2014-03-04get_homedir(), checks HOME and the password databaseJérémie Courrèges-Anglas
* ensures that the resulting home directory isn't the empty string (else returns NULL)
2014-02-20Detect pwd.h and getpwuid.Jérémie Courrèges-Anglas
2014-02-20If HOME is not set in the env., fallback to the passwd entry.Jérémie Courrèges-Anglas
* No attempt to detect pwd.h / getpwuid, not sure if needed.
2014-02-20Mark the X socket as to be closed on exec.Jérémie Courrèges-Anglas
* Avoids leaking a descriptor, and potential problems described in the comp.windows.x FAQ.
2014-02-20Change set_close_on_exec to take a file descriptor.Jérémie Courrèges-Anglas
* Since it's easier to get a fd from a FILE * rather than the other way around.
2014-01-04Kill init_globals().Jérémie Courrèges-Anglas
* selection has static storage and is thus correctly initialized.
2014-01-03Get rid of useless casts of xmalloc/realloc return value.Jérémie Courrèges-Anglas
2014-01-03if (ptr) free(ptr) is not a good idiom.Jérémie Courrèges-Anglas
2014-01-03Open $sysconfdir/ratpoisonrc, don't hardcode /etc.Jérémie Courrèges-Anglas
2014-01-03Be more verbose about failures in read_startup_files().Jérémie Courrèges-Anglas
* If we fail with errno set to something != ENOENT then an error message should probably be printed.
2014-01-03Better error checking for -f configfile.Jérémie Courrèges-Anglas
* make read_startup_files() return whether it succeeded. A failure is when the user passed a specific config file, but we couldn't load it. * in main() exit if read_startup_files() failed.
2014-01-03Report bugs to PACKAGE_BUGREPORT.Jérémie Courrèges-Anglas
2014-01-03In str_comp() make len and i size_t.Jérémie Courrèges-Anglas
2014-01-03Typo in comment.Jérémie Courrèges-Anglas
2014-01-03Tiny xmalloc/realloc/strdup cleanup.Jérémie Courrèges-Anglas
* kill "register" * compare pointers against NULL * separate declarations and code
2014-01-03FD_CLOEXEC is only used in set_close_on_exec().Jérémie Courrèges-Anglas
2013-11-22Cast char arguments to to*/is* ctype calls to unsigned charJérémie Courrèges-Anglas
* those functions expect an int whose value is between -1 and 255. Cast to unsigned char so that sign extension when promoting to int doesn't bite us.
2013-06-04fix logic in strtok_wsJérémie Courrèges-Anglas
bug reported by Ellington Santos on the mailing-list, thanks!
2013-04-13read_rc_file: use getline(3) instead of emulating itJérémie Courrèges-Anglas
2013-04-10main: in case XOpenDisplay fails, use exit not returnJérémie Courrèges-Anglas
* this is consistent with surrounding code, and helps code analyzers not to barf about possible memory leaks
2013-04-10strtok_ws: account for erroneous usageJérémie Courrèges-Anglas
* if s and last are both NULL then we'll get a fatal error; instead of waiting for the segfault, display an error message and call abort()
2013-04-10main: free display and alt_rcfileJérémie Courrèges-Anglas
* otherwise specifying -d or -f more than once would lead to a memory leak
2013-04-07In strtok_ws() use "last", not "pointer" for the static variableJérémie Courrèges-Anglas
* since X11/Xdefs.h may define it too. Found by -Wshadow. Bonus: "last" carries more meaning.