Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
619a0bf
)
convert a XSelectInput to XCB
author
David Hill
<dhill@conformal.com>
Fri, 6 Jul 2012 06:48:23 +0000
(
02:48
-0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 21:58:31 +0000
(
05:58
+0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
1f88aa2
..
530c942
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-6287,7
+6287,8
@@
manage_window(xcb_window_t id)
const char *errstr;
struct pid_e *p;
struct quirk *qp;
const char *errstr;
struct pid_e *p;
struct quirk *qp;
-
+ uint32_t event_mask;
+
if ((win = find_window(id)) != NULL)
return (win); /* already being managed */
if ((win = find_window(id)) != NULL)
return (win); /* already being managed */
@@
-6506,9
+6507,12
@@
manage_window(xcb_window_t id)
update_window(win);
}
update_window(win);
}
- XSelectInput(display, id, EnterWindowMask | FocusChangeMask |
- PropertyChangeMask | StructureNotifyMask);
+ event_mask = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE |
+ XCB_EVENT_MASK_PROPERTY_CHANGE |
+ XCB_EVENT_MASK_STRUCTURE_NOTIFY;
+ xcb_change_window_attributes(conn, id, XCB_CW_EVENT_MASK, &event_mask);
+
/* floaters need to be mapped if they are in the current workspace */
if ((win->floating || win->transient) && (ws->idx == r->ws->idx))
map_window_raised(win->id);
/* floaters need to be mapped if they are in the current workspace */
if ((win->floating || win->transient) && (ws->idx == r->ws->idx))
map_window_raised(win->id);