diff --git a/ChangeLog b/ChangeLog index f24fee0..1095fbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-15 Wolfgang Lux + + * Source/x11/XGServerEvent.m (-processEvent:): Ignore + _NET_STATE_WM property changes with Window Maker as it causes + problems with hidden windows. + Add a workaround for Window Maker so that unhidden windows + correctly show their document edited status. + 2008-12-11 Fred Kiefer * Source/cairo/CairoContext.m (-GSDrawImage::): Correct test diff --git a/Source/x11/XGServerEvent.m b/Source/x11/XGServerEvent.m index 38cb79e..4d42798 100644 --- a/Source/x11/XGServerEvent.m +++ b/Source/x11/XGServerEvent.m @@ -1314,7 +1314,13 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym) xEvent.xproperty.window, XGetAtomName(dpy, xEvent.xproperty.atom)); { - if (xEvent.xproperty.atom == generic.netstates.net_wm_state_atom && + /* Note: Don't rely on _NET_STATE_WM_HIDDEN with Window Maker, + * since it is impossible to distinguish miniaturized and hidden + * windows by their window properties. Fortunately, Window Maker + * will send us client message when a window is miniaturized. + */ + if ((generic.wm & XGWM_WINDOWMAKER) == 0 && + xEvent.xproperty.atom == generic.netstates.net_wm_state_atom && xEvent.xproperty.state == PropertyNewValue) { if (cWin == 0 || xEvent.xproperty.window != cWin->ident) @@ -1497,6 +1503,21 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym) } } + /* Work around a bug in Window Maker, which does not preserve + * the document edited status and uses the wrong close button + * when a window is shown again after hiding it + */ + if (generic.wm & XGWM_WINDOWMAKER) + { +/* Warning ... X-bug .. when we specify 32bit data X actually expects data + * of type 'long' or 'unsigned long' even on machines where those types + * hold 64bit values. + */ + XChangeProperty(dpy, cWin->ident, generic.win_decor_atom, + generic.win_decor_atom, 32, PropModeReplace, + (unsigned char *)&cWin->win_attrs, + sizeof(GNUstepWMAttributes)/sizeof(CARD32)); + } } break;