Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except it can be easily set by the user (e.g. you are using KDM and can't start a session through ~/.xsession). Signed-off-by: Michael Walle <michael@walle.cc>
This commit is contained in:
parent
0c51b57b99
commit
5aa43d61f8
|
@ -123,6 +123,16 @@ struct Config {
|
|||
* more often. */
|
||||
bool force_focus_wrapping;
|
||||
|
||||
/** By default, use the RandR API for multi-monitor setups.
|
||||
* Unfortunately, the nVidia binary graphics driver doesn't support
|
||||
* this API. Instead, it only support the less powerful Xinerama API,
|
||||
* which can be enabled by this option.
|
||||
*
|
||||
* Note: this option takes only effect on the initial startup (eg.
|
||||
* reconfiguration is not possible). On startup, the list of screens
|
||||
* is fetched once and never updated. */
|
||||
bool force_xinerama;
|
||||
|
||||
/** The default border style for new windows. */
|
||||
border_style_t default_border;
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ none { return TOK_NONE; }
|
|||
1pixel { return TOK_1PIXEL; }
|
||||
focus_follows_mouse { return TOKFOCUSFOLLOWSMOUSE; }
|
||||
force_focus_wrapping { return TOK_FORCE_FOCUS_WRAPPING; }
|
||||
force_xinerama { return TOK_FORCE_XINERAMA; }
|
||||
workspace_bar { return TOKWORKSPACEBAR; }
|
||||
popup_during_fullscreen { return TOK_POPUP_DURING_FULLSCREEN; }
|
||||
ignore { return TOK_IGNORE; }
|
||||
|
|
|
@ -619,6 +619,7 @@ void parse_file(const char *f) {
|
|||
%token TOK_1PIXEL "1pixel"
|
||||
%token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse"
|
||||
%token TOK_FORCE_FOCUS_WRAPPING "force_focus_wrapping"
|
||||
%token TOK_FORCE_XINERAMA "force_xinerama"
|
||||
%token TOKWORKSPACEBAR "workspace_bar"
|
||||
%token TOK_DEFAULT "default"
|
||||
%token TOK_STACKING "stacking"
|
||||
|
@ -674,6 +675,7 @@ line:
|
|||
| new_float
|
||||
| focus_follows_mouse
|
||||
| force_focus_wrapping
|
||||
| force_xinerama
|
||||
| workspace_bar
|
||||
| workspace
|
||||
| assign
|
||||
|
@ -1022,6 +1024,14 @@ force_focus_wrapping:
|
|||
}
|
||||
;
|
||||
|
||||
force_xinerama:
|
||||
TOK_FORCE_XINERAMA bool
|
||||
{
|
||||
DLOG("force xinerama = %d\n", $2);
|
||||
config.force_xinerama = $2;
|
||||
}
|
||||
;
|
||||
|
||||
workspace_bar:
|
||||
TOKWORKSPACEBAR bool
|
||||
{
|
||||
|
|
|
@ -432,7 +432,10 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
free(greply);
|
||||
|
||||
if (force_xinerama) {
|
||||
/* Force Xinerama (for drivers which don't support RandR yet, esp. the
|
||||
* nVidia binary graphics driver), when specified either in the config
|
||||
* file or on command-line */
|
||||
if (force_xinerama || config.force_xinerama) {
|
||||
xinerama_init();
|
||||
} else {
|
||||
DLOG("Checking for XRandR...\n");
|
||||
|
|
Loading…
Reference in New Issue