xwindow_buttons_grab(): Ignore XCB_NONE as window
Trying to grab buttons on window "XCB_NONE" results in an X11 error. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2452747e04
commit
f0297e5dd2
|
@ -104,6 +104,9 @@ xwindow_configure(xcb_window_t win, area_t geometry, int border)
|
|||
void
|
||||
xwindow_buttons_grab(xcb_window_t win, button_array_t *buttons)
|
||||
{
|
||||
if(win == XCB_NONE)
|
||||
return;
|
||||
|
||||
/* Ungrab everything first */
|
||||
xcb_ungrab_button(globalconf.connection, XCB_BUTTON_INDEX_ANY, win, XCB_BUTTON_MASK_ANY);
|
||||
|
||||
|
|
Loading…
Reference in New Issue