diff --git a/ChangeLog b/ChangeLog index 860a7642..88400f47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-03-11 Sergii Stoian + + * Source/x11/XGServerWindow.m (_createAppIconPixmaps): accept + WRaster context depth 24. + (styleoffsets::::::): do not guess offsets for miniwindow and + appicon they are equal to 0.0. + 2020-03-12 Sergii Stoian * Source/art/GNUmakefile.preamble, diff --git a/Source/x11/XGServerEvent.m b/Source/x11/XGServerEvent.m index 1e56e493..baea0ce3 100644 --- a/Source/x11/XGServerEvent.m +++ b/Source/x11/XGServerEvent.m @@ -1977,10 +1977,21 @@ - (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent events */ if ([NSApp isHidden]) { - /* This often occurs when hidding an app, since a bunch of - windows get hidden at once, and the WM is searching for a - window to take focus after each one gets hidden. */ - NSDebugLLog(@"Focus", @"WM take focus while hiding"); + if (generic.wm & XGWM_WINDOWMAKER) + { + /* If window receives WM_TAKE_FOCUS and application is in hidden + state - it's time to unhide. There's no other method to + tell us to unhide. */ + NSDebugLLog(@"Focus", @"WM take focus while hidden - unhiding."); + [NSApp unhide:nil]; + } + else + { + /* This often occurs when hidding an app, since a bunch of + windows get hidden at once, and the WM is searching for a + window to take focus after each one gets hidden. */ + NSDebugLLog(@"Focus", @"WM take focus while hiding"); + } } else if (cWin->ignore_take_focus == YES) { diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index e1f6f932..9fbccb93 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -2283,7 +2283,8 @@ - (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b if ((style & NSIconWindowMask) || (style & NSMiniWindowMask)) { - style = NSBorderlessWindowMask; + *l = *r = *t = *b = 0.0; + return; } /* Next try to get the offset information that we have obtained from @@ -2841,7 +2842,7 @@ - (int) _createAppIconPixmaps height = [rep pixelsHigh]; colors = [rep samplesPerPixel]; - if (rcontext->depth != 32) + if (rcontext->depth != 32 && rcontext->depth != 24) { NSLog(@"Unsupported context depth %d", rcontext->depth); return 0;