Author: wlux
Date: Fri Nov 13 16:30:15 2015
New Revision: 39171
URL: http://svn.gna.org/viewcvs/gnustep?rev=39171&view=rev
Log:
Create an empty app icon window before eventually checking the window
frame offsets when using WindowMaker. This fixes the issue that the
first GNUstep application started under WindowMaker did not get a
proper application menu.
Modified:
libs/back/trunk/ChangeLog
libs/back/trunk/Source/x11/XGServerWindow.m
Modified: libs/back/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/back/trunk/ChangeLog?rev=39171&r1=39170&r2=39171&view=diff
==============================================================================
--- libs/back/trunk/ChangeLog (original)
+++ libs/back/trunk/ChangeLog Fri Nov 13 16:30:15 2015
@@ -1,3 +1,11 @@
+2015-11-13 Wolfgang Lux <[email protected]>
+
+ * Source/x11/XGServerWindow.m (_setupRootWindow, window::::):
+ Create an empty app icon window before eventually checking the
+ window frame offsets when using WindowMaker. This fixes the issue
+ that the first GNUstep application started under WindowMaker did
+ not get a proper application menu.
+
2015-11-03 Fred Kiefer <[email protected]>
* Source/x11/XGServerEvent.m (-processEvent:): For repeated keys
Modified: libs/back/trunk/Source/x11/XGServerWindow.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/back/trunk/Source/x11/XGServerWindow.m?rev=39171&r1=39170&r2=39171&view=diff
==============================================================================
--- libs/back/trunk/Source/x11/XGServerWindow.m (original)
+++ libs/back/trunk/Source/x11/XGServerWindow.m Fri Nov 13 16:30:15 2015
@@ -74,6 +74,7 @@
static BOOL handlesWindowDecorations = YES;
+static int _wmAppIcon = -1;
/*
@@ -1708,6 +1709,24 @@
// FIXME: Need to set WM_CLIENT_MACHINE as well.
}
+ /* WindowMaker hack: We want to display our own app icon window in the
+ * icon window provided by WindowMaker. However, this only works when
+ * the icon window is the first window being mapped. For that reason,
+ * we create an empty icon window here before the code below eventually
+ * generates some temporary windows to determine the window frame offsets
+ * and reuse the icon window once the real app icon window is allocated.
+ */
+ if ((generic.wm & XGWM_WINDOWMAKER) == XGWM_WINDOWMAKER
+ && generic.flags.useWindowMakerIcons == 1)
+ {
+ NSDebugLLog(@"XGTrace", @"WindowMaker hack: Preparing app icon window");
+ _wmAppIcon =
+ [self window: NSZeroRect : NSBackingStoreBuffered
+ : NSIconWindowMask : defScreen];
+ [self orderwindow: NSWindowAbove : -1 : _wmAppIcon];
+ NSDebugLLog(@"XGTrace", @"WindowMaker hack: icon window = %d",
_wmAppIcon);
+ }
+
/* We need to determine the offsets between the actual decorated window
* and the window we draw into.
*/
@@ -1996,6 +2015,19 @@
RContext *context;
NSDebugLLog(@"XGTrace", @"DPSwindow: %@ %d", NSStringFromRect(frame),
(int)type);
+ /* WindowMaker hack: Reuse the empty app icon allocated in _setupRootWindow
+ * for the real app icon.
+ */
+ if ((generic.wm & XGWM_WINDOWMAKER) == XGWM_WINDOWMAKER
+ && generic.flags.useWindowMakerIcons == 1
+ && (style & NSIconWindowMask) == NSIconWindowMask
+ && _wmAppIcon != -1)
+ {
+ int win = _wmAppIcon;
+ NSDebugLLog(@"XGTrace", @"WindowMaker hack: Returning window %d as app
icon window", win);
+ _wmAppIcon = -1;
+ return win;
+ }
root = [self _rootWindowForScreen: screen];
context = [self xrContextForScreen: screen];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs