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.
pull/2/head
Richard Grenville 12 years ago
parent be3451e097
commit fb18759b02

@ -1055,6 +1055,10 @@ paint_all(Display *dpy, XserverRegion region) {
continue; continue;
} }
#ifdef DEBUG_REPAINT
printf(" %#010lx", w->id);
#endif
if (!w->picture) { if (!w->picture) {
XRenderPictureAttributes pa; XRenderPictureAttributes pa;
XRenderPictFormat *format; XRenderPictFormat *format;
@ -1074,10 +1078,6 @@ paint_all(Display *dpy, XserverRegion region) {
dpy, draw, format, CPSubwindowMode, &pa); dpy, draw, format, CPSubwindowMode, &pa);
} }
#ifdef DEBUG_REPAINT
printf(" %#010lx", w->id);
#endif
if (!w->border_size) { if (!w->border_size) {
w->border_size = border_size(dpy, w); w->border_size = border_size(dpy, w);
} }
@ -1433,22 +1433,21 @@ map_win(Display *dpy, Window id,
w->id, wintype_name(w->window_type)); w->id, wintype_name(w->window_type));
#endif #endif
/* select before reading the property // Call XSelectInput() before reading properties so that no property
so that no property changes are lost */ // changes are lost
if (!override_redirect) { XSelectInput(dpy, id, determine_evmask(dpy, id, WIN_EVMODE_FRAME));
// Detect client window here instead of in add_win() as the client
// window should have been prepared at this point // Notify compton when the shape of a window changes
if (!(w->client_win)) { if (shape_exists) {
Window cw = find_client_win(dpy, w->id); XShapeSelectInput(dpy, id, ShapeNotifyMask);
if (cw) { }
mark_client_win(dpy, w, cw);
}
}
XSelectInput(dpy, id, determine_evmask(dpy, id, WIN_EVMODE_FRAME)); // Detect client window here instead of in add_win() as the client
// Notify compton when the shape of a window changes // window should have been prepared at this point
if (shape_exists) { if (!(w->client_win)) {
XShapeSelectInput(dpy, id, ShapeNotifyMask); 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"; return "Expose";
case PropertyNotify: case PropertyNotify:
return "PropertyNotify"; return "PropertyNotify";
case ClientMessage:
return "ClientMessage";
default: default:
if (ev->type == damage_event + XDamageNotify) { if (ev->type == damage_event + XDamageNotify) {
return "Damage"; return "Damage";
@ -2284,6 +2285,8 @@ ev_window(XEvent *ev) {
return ev->xexpose.window; return ev->xexpose.window;
case PropertyNotify: case PropertyNotify:
return ev->xproperty.window; return ev->xproperty.window;
case ClientMessage:
return ev->xclient.window;
default: default:
if (ev->type == damage_event + XDamageNotify) { if (ev->type == damage_event + XDamageNotify) {
return ((XDamageNotifyEvent *)ev)->drawable; return ((XDamageNotifyEvent *)ev)->drawable;

Loading…
Cancel
Save