skip ConfigureNotify events with --force_xinerama
This prevents an i3 crash under certain conditions when running the tests.
This commit is contained in:
parent
7208df2d38
commit
8e528d2de8
|
@ -74,3 +74,4 @@ extern bool xcursor_supported, xkb_supported;
|
||||||
extern xcb_window_t root;
|
extern xcb_window_t root;
|
||||||
extern struct ev_loop *main_loop;
|
extern struct ev_loop *main_loop;
|
||||||
extern bool only_check_config;
|
extern bool only_check_config;
|
||||||
|
extern bool force_xinerama;
|
||||||
|
|
|
@ -1264,6 +1264,9 @@ static void handle_configure_notify(xcb_configure_notify_event_t *event) {
|
||||||
}
|
}
|
||||||
DLOG("ConfigureNotify for root window 0x%08x\n", event->event);
|
DLOG("ConfigureNotify for root window 0x%08x\n", event->event);
|
||||||
|
|
||||||
|
if (force_xinerama) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
randr_query_outputs();
|
randr_query_outputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,8 @@ struct ws_assignments_head ws_assignments = TAILQ_HEAD_INITIALIZER(ws_assignment
|
||||||
bool xcursor_supported = true;
|
bool xcursor_supported = true;
|
||||||
bool xkb_supported = true;
|
bool xkb_supported = true;
|
||||||
|
|
||||||
|
bool force_xinerama = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This callback is only a dummy, see xcb_prepare_cb and xcb_check_cb.
|
* This callback is only a dummy, see xcb_prepare_cb and xcb_check_cb.
|
||||||
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
|
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
|
||||||
|
@ -197,7 +199,6 @@ int main(int argc, char *argv[]) {
|
||||||
bool autostart = true;
|
bool autostart = true;
|
||||||
char *layout_path = NULL;
|
char *layout_path = NULL;
|
||||||
bool delete_layout_path = false;
|
bool delete_layout_path = false;
|
||||||
bool force_xinerama = false;
|
|
||||||
bool disable_randr15 = false;
|
bool disable_randr15 = false;
|
||||||
char *fake_outputs = NULL;
|
char *fake_outputs = NULL;
|
||||||
bool disable_signalhandler = false;
|
bool disable_signalhandler = false;
|
||||||
|
@ -550,6 +551,10 @@ int main(int argc, char *argv[]) {
|
||||||
config.ipc_socket_path = sstrdup(config.ipc_socket_path);
|
config.ipc_socket_path = sstrdup(config.ipc_socket_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.force_xinerama) {
|
||||||
|
force_xinerama = true;
|
||||||
|
}
|
||||||
|
|
||||||
xcb_void_cookie_t cookie;
|
xcb_void_cookie_t cookie;
|
||||||
cookie = xcb_change_window_attributes_checked(conn, root, XCB_CW_EVENT_MASK, (uint32_t[]){ROOT_EVENT_MASK});
|
cookie = xcb_change_window_attributes_checked(conn, root, XCB_CW_EVENT_MASK, (uint32_t[]){ROOT_EVENT_MASK});
|
||||||
xcb_generic_error_t *error = xcb_request_check(conn, cookie);
|
xcb_generic_error_t *error = xcb_request_check(conn, cookie);
|
||||||
|
@ -668,7 +673,7 @@ int main(int argc, char *argv[]) {
|
||||||
fake_outputs_init(fake_outputs);
|
fake_outputs_init(fake_outputs);
|
||||||
FREE(fake_outputs);
|
FREE(fake_outputs);
|
||||||
config.fake_outputs = NULL;
|
config.fake_outputs = NULL;
|
||||||
} else if (force_xinerama || config.force_xinerama) {
|
} else if (force_xinerama) {
|
||||||
/* Force Xinerama (for drivers which don't support RandR yet, esp. the
|
/* Force Xinerama (for drivers which don't support RandR yet, esp. the
|
||||||
* nVidia binary graphics driver), when specified either in the config
|
* nVidia binary graphics driver), when specified either in the config
|
||||||
* file or on command-line */
|
* file or on command-line */
|
||||||
|
|
Loading…
Reference in New Issue