Fix two issues with Window Maker.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27296 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2008-12-15 20:47:06 +00:00
parent b644571f1a
commit 0981aebea3
2 changed files with 30 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2008-12-15 Wolfgang Lux <wolfgang.lux@gmail.com>
* 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 <FredKiefer@gmx.de>
* Source/cairo/CairoContext.m (-GSDrawImage::): Correct test

View file

@ -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;