diff options
-rw-r--r-- | schewm.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1362,17 +1362,22 @@ dpy_make_client(xcb_window_t window) { &window_type, NULL); if (reply) { + // Figure out from window type if we should ignore it + bool should_ignore = false; for (uint32_t i = 0; i < window_type.atoms_len; i++) { xcb_atom_t atom = window_type.atoms[i]; if (atom == dpy.ewmh->_NET_WM_WINDOW_TYPE_TOOLBAR || atom == dpy.ewmh->_NET_WM_WINDOW_TYPE_DESKTOP || atom == dpy.ewmh->_NET_WM_WINDOW_TYPE_DOCK) { // Ignore those windows - xcb_ewmh_get_atoms_reply_wipe(&window_type); - return NULL; + should_ignore = true; + break; } } xcb_ewmh_get_atoms_reply_wipe(&window_type); + if (should_ignore) { + return NULL; + } } uint32_t event_mask[] = { XCB_EVENT_MASK_ENTER_WINDOW, XCB_NONE }; |