mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Remove useless x_select_input() which leaded to useless requests
This commit is contained in:
parent
abcb60b9ea
commit
4a1720ddca
5 changed files with 11 additions and 21 deletions
10
awesome.c
10
awesome.c
|
@ -384,14 +384,17 @@ main(int argc, char *argv[])
|
|||
globalconf.evenths = xcb_alloc_event_handlers(conn);
|
||||
xcb_set_error_handler_catch_all(globalconf.evenths, xerrorstart, NULL);
|
||||
|
||||
const uint32_t select_input_val = XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT;
|
||||
|
||||
for(screen_nbr = 0;
|
||||
screen_nbr < xcb_setup_roots_length(xcb_get_setup(conn));
|
||||
screen_nbr++)
|
||||
{
|
||||
/* this causes an error if some other window manager is
|
||||
* running */
|
||||
x_select_input(conn, root_window(conn, screen_nbr),
|
||||
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT);
|
||||
xcb_change_window_attributes(conn,
|
||||
root_window(conn, screen_nbr),
|
||||
XCB_CW_EVENT_MASK, &select_input_val);
|
||||
}
|
||||
|
||||
/* need to xcb_flush to validate error handler */
|
||||
|
@ -455,9 +458,6 @@ main(int argc, char *argv[])
|
|||
root_window(globalconf.connection, screen_nbr),
|
||||
XCB_CW_EVENT_MASK | XCB_CW_CURSOR,
|
||||
change_win_vals);
|
||||
x_select_input(globalconf.connection,
|
||||
root_window(globalconf.connection, screen_nbr),
|
||||
change_win_vals[0]);
|
||||
ewmh_set_supported_hints(screen_nbr);
|
||||
/* call this to at least grab root window clicks */
|
||||
window_root_grabbuttons(screen_nbr);
|
||||
|
|
7
client.c
7
client.c
|
@ -410,7 +410,12 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
|||
/* update titlebar with real floating info now */
|
||||
titlebar_update_geometry_floating(c);
|
||||
|
||||
x_select_input(globalconf.connection, w, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_ENTER_WINDOW);
|
||||
const uint32_t select_input_val[] = {
|
||||
XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_PROPERTY_CHANGE |
|
||||
XCB_EVENT_MASK_ENTER_WINDOW };
|
||||
|
||||
xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK,
|
||||
select_input_val);
|
||||
|
||||
/* handle xshape */
|
||||
if(globalconf.have_shape)
|
||||
|
|
|
@ -69,8 +69,6 @@ simplewindow_new(xcb_connection_t *conn, int phys_screen, int x, int y,
|
|||
XCB_CW_BACK_PIXMAP | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK,
|
||||
create_win_val);
|
||||
|
||||
x_select_input(conn, sw->window, create_win_val[2]);
|
||||
|
||||
sw->drawable = xcb_generate_id(conn);
|
||||
xcb_create_pixmap(conn, s->root_depth, sw->drawable,
|
||||
root_window(conn, phys_screen), w, h);
|
||||
|
|
|
@ -94,18 +94,6 @@ xgetnumlockmask(xcb_connection_t *conn)
|
|||
return mask;
|
||||
}
|
||||
|
||||
/** 'XSelectInput' from Xlib is only a function around
|
||||
* 'ChangeWindowAttributes' which set the value mask to 'CWEventMask'
|
||||
* \param c X connection
|
||||
*/
|
||||
void
|
||||
x_select_input(xcb_connection_t *c, xcb_window_t w,
|
||||
uint32_t event_mask)
|
||||
{
|
||||
const uint32_t config_win_val[] = { event_mask };
|
||||
xcb_change_window_attributes(c, w, XCB_CW_EVENT_MASK, config_win_val);
|
||||
}
|
||||
|
||||
/** Equivalent to 'XGetTransientForHint' which is actually a
|
||||
* 'XGetWindowProperty' which gets the WM_TRANSIENT_FOR property of
|
||||
* the specified window
|
||||
|
|
|
@ -76,7 +76,6 @@ unsigned int xgetnumlockmask(xcb_connection_t *);
|
|||
/* End of macros not defined in XCB */
|
||||
|
||||
/* Common function defined in Xlib but not in XCB */
|
||||
void x_select_input(xcb_connection_t *, xcb_window_t, uint32_t);
|
||||
bool x_get_transient_for_hint(xcb_connection_t *, xcb_window_t, xcb_window_t *);
|
||||
bool xinerama_is_active(xcb_connection_t *);
|
||||
xcb_window_t root_window(xcb_connection_t *, int);
|
||||
|
|
Loading…
Reference in a new issue