summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2012-09-18 11:28:09 +0800
committerRichard Grenville <[email protected]>2012-09-18 11:28:09 +0800
commitfb18759b02d274602fdc75ee7f00a2f8bc42676b (patch)
treeb66cfc718717f67c079277e82e9872eb1e40ef94
parentbe3451e09798b1ec72c69e1372e94257219f4abc (diff)
downloadtdebase-fb18759b02d274602fdc75ee7f00a2f8bc42676b.tar.gz
tdebase-fb18759b02d274602fdc75ee7f00a2f8bc42676b.zip
Bug fix: Issue #23, notify-osd not rendered
More details in the issue report. - Add ClientMessage detection to ev_name() and ev_window(), although we don't actually handle the event.
-rw-r--r--compton.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/compton.c b/compton.c
index 389b857b3..d620a7e66 100644
--- a/compton.c
+++ b/compton.c
@@ -1055,6 +1055,10 @@ paint_all(Display *dpy, XserverRegion region) {
continue;
}
+#ifdef DEBUG_REPAINT
+ printf(" %#010lx", w->id);
+#endif
+
if (!w->picture) {
XRenderPictureAttributes pa;
XRenderPictFormat *format;
@@ -1074,10 +1078,6 @@ paint_all(Display *dpy, XserverRegion region) {
dpy, draw, format, CPSubwindowMode, &pa);
}
-#ifdef DEBUG_REPAINT
- printf(" %#010lx", w->id);
-#endif
-
if (!w->border_size) {
w->border_size = border_size(dpy, w);
}
@@ -1433,22 +1433,21 @@ map_win(Display *dpy, Window id,
w->id, wintype_name(w->window_type));
#endif
- /* select before reading the property
- so that no property changes are lost */
- if (!override_redirect) {
- // Detect client window here instead of in add_win() as the client
- // window should have been prepared at this point
- if (!(w->client_win)) {
- Window cw = find_client_win(dpy, w->id);
- if (cw) {
- mark_client_win(dpy, w, cw);
- }
- }
+ // Call XSelectInput() before reading properties so that no property
+ // changes are lost
+ XSelectInput(dpy, id, determine_evmask(dpy, id, WIN_EVMODE_FRAME));
+
+ // Notify compton when the shape of a window changes
+ if (shape_exists) {
+ XShapeSelectInput(dpy, id, ShapeNotifyMask);
+ }
- XSelectInput(dpy, id, determine_evmask(dpy, id, WIN_EVMODE_FRAME));
- // Notify compton when the shape of a window changes
- if (shape_exists) {
- XShapeSelectInput(dpy, id, ShapeNotifyMask);
+ // Detect client window here instead of in add_win() as the client
+ // window should have been prepared at this point
+ if (!(w->client_win)) {
+ Window cw = find_client_win(dpy, w->id);
+ if (cw) {
+ mark_client_win(dpy, w, cw);
}
}
@@ -2247,6 +2246,8 @@ ev_name(XEvent *ev) {
return "Expose";
case PropertyNotify:
return "PropertyNotify";
+ case ClientMessage:
+ return "ClientMessage";
default:
if (ev->type == damage_event + XDamageNotify) {
return "Damage";
@@ -2284,6 +2285,8 @@ ev_window(XEvent *ev) {
return ev->xexpose.window;
case PropertyNotify:
return ev->xproperty.window;
+ case ClientMessage:
+ return ev->xclient.window;
default:
if (ev->type == damage_event + XDamageNotify) {
return ((XDamageNotifyEvent *)ev)->drawable;