* Source/x11/XGServerWindow.m (_checkStyle:): do not set application

name and WindowGroupHint to temporary window. Created window designed
to help get window frame offsets only - appicon window will be created
later. This change prevents appicon flickering on WindowMaker at
application start.
(_createWMAppiconHack, _setupRootWindow): WindowMaker hack removed in
favour of solution introduced in _checkStyle:.
This commit is contained in:
Sergii Stoian 2021-01-27 15:37:27 +02:00
parent 3f3c1305a9
commit e5cdc1747b
2 changed files with 12 additions and 30 deletions

View file

@ -1,3 +1,13 @@
2021-01-27 Sergii Stoian <stoyan255@gmail.com>
* Source/x11/XGServerWindow.m (_checkStyle:): do not set application
name and WindowGroupHint to temporary window. Created window designed
to help get window frame offsets only - appicon window will be created
later. This change prevents appicon flickering on WindowMaker at
application start.
(_createWMAppiconHack, _setupRootWindow): WindowMaker hack removed in
favour of solution introduced in _checkStyle:.
2021-01-24 Sergii Stoian <stoyan255@gmail.com>
* Source/x11/XGServerWindow.m: WindowMaker doesn't support

View file

@ -762,20 +762,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
return NO;
}
- (void) _createWMAppiconHack
{
NSSize iconSize = [self iconSize];
NSDebugLLog(@"XGTrace", @"WindowMaker hack: Preparing app icon window");
_wmAppIcon = [self window
: NSMakeRect(0, 0, iconSize.width, iconSize.height)
: NSBackingStoreBuffered : NSIconWindowMask : defScreen];
[self orderwindow: NSWindowAbove : -1 : _wmAppIcon];
NSDebugLLog(@"XGTrace", @"WindowMaker hack: icon window = %d", _wmAppIcon);
}
- (unsigned long*) _getExtents: (Window)win
{
int count;
@ -872,7 +858,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
/*
* Mark this as a GNUstep app with the current application name.
*/
classhint.res_name = generic.rootName;
classhint.res_name = "CheckWindowStyle";
classhint.res_class = "GNUstep";
XSetClassHint(dpy, window->ident, &classhint);
@ -926,9 +912,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
// Use the globally active input mode
window->gen_hints.flags = InputHint;
window->gen_hints.input = False;
// All the windows of a GNUstep application belong to one group.
window->gen_hints.flags |= WindowGroupHint;
window->gen_hints.window_group = ROOT;
/*
* Prepare the protocols supported by the window.
@ -1638,6 +1621,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
*/
if ([defs boolForKey: @"GSIgnoreRootOffsets"] == YES)
{
NSLog(@"Ignoring _GNUSTEP_FRAME_OFFSETS root window property.");
offsets = 0;
}
else
@ -1651,18 +1635,6 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
{
BOOL ok = YES;
/* 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
* generate temporary window to determine the window frame offsets
* and reuse the icon window once the real app icon window is allocated.
*/
if ((generic.wm & XGWM_WINDOWMAKER) && generic.flags.useWindowMakerIcons == 1)
{
[self _createWMAppiconHack];
}
/* No offsets available on the root window ... so we test each
* style of window to determine its offsets.
*/