mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Move call to xcb_randr_select_input into screen.c
The code in screen.c should decide about this kind of thing. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
cba8655ca8
commit
8de8df1415
2 changed files with 6 additions and 3 deletions
4
event.c
4
event.c
|
@ -992,10 +992,8 @@ void event_init(void)
|
|||
const xcb_query_extension_reply_t *reply;
|
||||
|
||||
reply = xcb_get_extension_data(globalconf.connection, &xcb_randr_id);
|
||||
if (reply && reply->present) {
|
||||
xcb_randr_select_input(globalconf.connection, globalconf.screen->root, XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE);
|
||||
if (reply && reply->present)
|
||||
globalconf.event_base_randr = reply->first_event;
|
||||
}
|
||||
|
||||
reply = xcb_get_extension_data(globalconf.connection, &xcb_shape_id);
|
||||
if (reply && reply->present)
|
||||
|
|
|
@ -371,6 +371,11 @@ screen_scan_randr(lua_State *L, screen_array_t *screens)
|
|||
|
||||
globalconf.have_randr_13 = minor_version >= 3;
|
||||
|
||||
/* We want to know when something changes */
|
||||
xcb_randr_select_input(globalconf.connection,
|
||||
globalconf.screen->root,
|
||||
XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE);
|
||||
|
||||
if (minor_version >= 5)
|
||||
screen_scan_randr_monitors(L, screens);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue