[gtk/wip/chergert/macos-iosurface: 3/4] macos: avoid redisplay when changing frame
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-iosurface: 3/4] macos: avoid redisplay when changing frame
- Date: Sat, 12 Feb 2022 06:13:37 +0000 (UTC)
commit 1d93fe5db6547a83c82b1ce8c87e9d9da00e4056
Author: Christian Hergert <christian hergert me>
Date: Fri Feb 11 20:19:24 2022 -0800
macos: avoid redisplay when changing frame
We don't need to display:YES because we control the contents of the window
separately from the Cocoa machinery.
gdk/macos/GdkMacosWindow.c | 6 +++---
gdk/macos/gdkmacossurface.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c
index 3ec436e064..8cecb4a534 100644
--- a/gdk/macos/GdkMacosWindow.c
+++ b/gdk/macos/GdkMacosWindow.c
@@ -244,7 +244,7 @@ typedef NSString *CALayerContentsGravity;
newFrame.size = last.size;
newFrame.origin = [self mouseLocationOutsideOfEventStream];
newFrame.origin.x -= last.size.width / 2;
- [self setFrame:newFrame display:YES];
+ [self setFrame:newFrame display:NO];
}
}
@@ -564,7 +564,7 @@ typedef NSString *CALayerContentsGravity;
new_frame.size.height = new_frame.size.width / [self aspectRatio].width * [self aspectRatio].height;
*/
- [self setFrame:new_frame display:YES];
+ [self setFrame:new_frame display:NO];
/* Let the resizing be handled by GTK. */
if (g_main_context_pending (NULL))
@@ -820,7 +820,7 @@ typedef NSString *CALayerContentsGravity;
-(void)windowWillExitFullScreen:(NSNotification *)aNotification
{
- [self setFrame:lastUnfullscreenFrame display:YES];
+ [self setFrame:lastUnfullscreenFrame display:NO];
}
-(void)windowDidExitFullScreen:(NSNotification *)aNotification
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 16f15bda30..be669783d5 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -930,7 +930,7 @@ _gdk_macos_surface_move_resize (GdkMacosSurface *self,
content_rect = NSMakeRect (x, y, width, height);
frame_rect = [self->window frameRectForContentRect:content_rect];
- [self->window setFrame:frame_rect display:YES];
+ [self->window setFrame:frame_rect display:NO];
if (size_changed)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]