Merge pull request #22 from gnustep/randr

Window positionning: rely on internal variable not the GUI's one
This commit is contained in:
Sergii Stoian 2020-02-24 23:56:44 +02:00 committed by GitHub
commit 983035a7a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2020-02-24 Sergii Stoian <stoyan255@gmail.com>
* Source/x11/XGServerWindow.m (placewindow::): use window->xframe
as current window frame instead of NSWindow's frame because
`_frame` ivar may be already changed to desired value.
2020-02-21 Fred Kiefer <FredKiefer@gmx.de> 2020-02-21 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (-_createAppIconPixmaps): Made * Source/x11/XGServerWindow.m (-_createAppIconPixmaps): Made

View file

@ -3234,8 +3234,7 @@ swapColors(unsigned char *image_data, NSBitmapImageRep *rep)
NSDebugLLog(@"XGTrace", @"DPSplacewindow: %@ : %d", NSStringFromRect(rect), NSDebugLLog(@"XGTrace", @"DPSplacewindow: %@ : %d", NSStringFromRect(rect),
win); win);
nswin = GSWindowWithNumber(win); frame = [self _XFrameToOSFrame: window->xframe for: window];
frame = [nswin frame];
if (NSEqualRects(rect, frame) == YES) if (NSEqualRects(rect, frame) == YES)
return; return;
if (NSEqualSizes(rect.size, frame.size) == NO) if (NSEqualSizes(rect.size, frame.size) == NO)
@ -3285,6 +3284,7 @@ swapColors(unsigned char *image_data, NSBitmapImageRep *rep)
with min/max sizes and resizability in some window managers. */ with min/max sizes and resizability in some window managers. */
setNormalHints(dpy, window); setNormalHints(dpy, window);
nswin = GSWindowWithNumber(win);
if (resize == YES) if (resize == YES)
{ {
NSDebugLLog(@"Moving", @"Fake size %lu - %@", window->number, NSDebugLLog(@"Moving", @"Fake size %lu - %@", window->number,