diff --git a/ChangeLog b/ChangeLog index c843d2a..7220de3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2434,3 +2434,9 @@ Mon Sep 20 20:33:13 PDT 1999 Michael Jennings and isn't now.... ------------------------------------------------------------------------------- +Mon Sep 20 21:00:46 PDT 1999 Michael Jennings + + Fixed a problem with sticky transparent Eterms not updating their + background image. + +------------------------------------------------------------------------------- diff --git a/src/events.c b/src/events.c index 7a482d3..9f5e5bb 100644 --- a/src/events.c +++ b/src/events.c @@ -230,12 +230,12 @@ handle_property_notify(event_t * ev) D_EVENTS(("handle_property_notify(ev [0x%08x] on window 0x%08x)\n", ev, ev->xany.window)); if (background_is_trans()) { - if (ev->xany.window == TermWin.parent) { + if ((ev->xany.window == TermWin.parent) || (ev->xany.window == Xroot)) { prop = XInternAtom(Xdisplay, "_WIN_WORKSPACE", True); + D_EVENTS(("handle_property_notify(): On %s. prop == 0x%08x, ev->xproperty.atom == 0x%08x\n", ((ev->xany.window == Xroot) ? "the root window" : "TermWin.parent"), (int) prop, (int) ev->xproperty.atom)); if ((prop == None) || (ev->xproperty.atom != prop)) { return 0; } - XSelectInput(Xdisplay, desktop_window, None); if (desktop_pixmap != None) { free_desktop_pixmap(); } @@ -244,10 +244,10 @@ handle_property_notify(event_t * ev) FOREACH_IMAGE(if (image_mode_is(idx, MODE_TRANS)) {image_set_mode(idx, MODE_IMAGE); image_allow_mode(idx, ALLOW_IMAGE);}); return 1; } - XSelectInput(Xdisplay, desktop_window, PropertyChangeMask); redraw_all_images(); } else if (ev->xany.window == desktop_window) { prop = XInternAtom(Xdisplay, "_XROOTPMAP_ID", True); + D_EVENTS(("handle_property_notify(): On TermWin.parent. prop == 0x%08x, ev->xproperty.atom == 0x%08x\n", (int) prop, (int) ev->xproperty.atom)); if ((prop == None) || (ev->xproperty.atom != prop)) { return 0; } diff --git a/src/pixmap.c b/src/pixmap.c index c48d734..e30b5a1 100644 --- a/src/pixmap.c +++ b/src/pixmap.c @@ -1048,7 +1048,7 @@ get_desktop_window(void) if (prop == None && prop2 == None) { return None; } - if (desktop_window != None) { + if ((desktop_window != None) && (desktop_window != Xroot)) { XSelectInput(Xdisplay, desktop_window, None); } @@ -1067,17 +1067,17 @@ get_desktop_window(void) } if (prop != None) { - XGetWindowProperty(Xdisplay, w, prop, 0L, 1L, False, AnyPropertyType, - &type, &format, &length, &after, &data); + XGetWindowProperty(Xdisplay, w, prop, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data); } else if (prop2 != None) { - XGetWindowProperty(Xdisplay, w, prop2, 0L, 1L, False, AnyPropertyType, - &type, &format, &length, &after, &data); + XGetWindowProperty(Xdisplay, w, prop2, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data); } else { continue; } if (type != None) { D_PIXMAP((" Found desktop as window 0x%08x\n", w)); - XSelectInput(Xdisplay, w, PropertyChangeMask); + if (w != Xroot) { + XSelectInput(Xdisplay, w, PropertyChangeMask); + } return (desktop_window = w); } } diff --git a/src/windows.c b/src/windows.c index 4dc8d3c..34e01ef 100644 --- a/src/windows.c +++ b/src/windows.c @@ -380,6 +380,7 @@ Create_Windows(int argc, char *argv[]) #endif XSetWMProperties(Xdisplay, TermWin.parent, NULL, NULL, argv, argc, &szHint, &wmHint, &classHint); + XSelectInput(Xdisplay, Xroot, PropertyChangeMask); XSelectInput(Xdisplay, TermWin.parent, (KeyPressMask | FocusChangeMask | StructureNotifyMask | VisibilityChangeMask | PropertyChangeMask)); if (mwmhints.flags) { XChangeProperty(Xdisplay, TermWin.parent, prop, prop, 32, PropModeReplace, (unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);