From 358491e4622ca1bfb2b1c4f128dbd9c44f0eb195 Mon Sep 17 00:00:00 2001 From: wlux Date: Sun, 1 Nov 2009 12:55:52 +0000 Subject: [PATCH] Partially revert the (defunct) recent window miniaturization changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28930 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 9 +++++++++ Source/x11/XGServerWindow.m | 29 ++++++----------------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 711eea2..28ed803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-01 Wolfgang Lux + + * Source/x11/XGServerWindow.m (setWindowHintsForStyle): Revert + change to (Motif) window style hints that would add a border + around appicons and miniwindows on some window managers. + + * Source/x11/XGServerWindow.m (-miniwindow): Remove code that can + make programs unresponsive during window miniaturization. + 2009-10-31 Thomas Gamper * Source/x11/XGGLFormat.m diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 21ba16d..915860f 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -327,14 +327,18 @@ static void setWindowHintsForStyle (Display *dpy, Window window, if (styleMask & NSIconWindowMask) { // FIXME - hints->flags &= ~MWM_HINTS_DECORATIONS; + hints->flags |= MWM_HINTS_DECORATIONS; + hints->flags |= MWM_HINTS_FUNCTIONS; hints->decorations = 0; + hints->functions = 0; } if (styleMask & NSMiniWindowMask) { // FIXME - hints->flags &= ~MWM_HINTS_DECORATIONS; + hints->flags |= MWM_HINTS_DECORATIONS; + hints->flags |= MWM_HINTS_FUNCTIONS; hints->decorations = 0; + hints->functions = 0; } } @@ -2584,27 +2588,6 @@ NSLog(@"styleoffsets ... guessing offsets\n"); XIconifyWindow(dpy, window->ident, window->screen); else XWithdrawWindow(dpy, window->ident, window->screen); - - /* Now discard all events for this window up to (and including) the - * property notify which tells us it is in a miniaturised state. - * This measns we can safely assume that the next event showing the - * window in a mapped state will mean it has been deminiaturised. - * - * FIXME ... what if the window manager doesn't tell us that the window - * has gone? Presumably we shouldn't wait forever? - */ - XSync(dpy, False); - for (;;) - { - XWindowEvent(dpy, window->ident, 0xffffffff, &e); - if (e.type == PropertyNotify - && e.xproperty.atom == generic.netstates.net_wm_state_atom - && e.xproperty.state == PropertyNewValue - && [self _ewmh_isMinimized: e.xproperty.window]) - { - break; - } - } } /**