[gtk/wip/chergert/gdk-macos-gl-renderer: 139/139] macos: remove layer scaling when resizing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gdk-macos-gl-renderer: 139/139] macos: remove layer scaling when resizing
- Date: Tue, 27 Oct 2020 17:30:59 +0000 (UTC)
commit ea09d35467746ab2ee28305c72fdac032b4cce6a
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 27 10:26:18 2020 -0700
macos: remove layer scaling when resizing
With the default values, the contents would scale as the window is
resized meaning things look rather jittery. This fixes that by keeping
the position fixed to the top-left. Note that we use BottomLeft because
the coordinates are flipped.
gdk/macos/GdkMacosGLView.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/GdkMacosGLView.c b/gdk/macos/GdkMacosGLView.c
index cab8c66638..8f64a91097 100644
--- a/gdk/macos/GdkMacosGLView.c
+++ b/gdk/macos/GdkMacosGLView.c
@@ -139,7 +139,11 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
_openGLContext = context;
if (_openGLContext != nil)
- [_openGLContext setView:self];
+ {
+ [_openGLContext setView:self];
+ [self setWantsLayer:YES];
+ [self.layer setContentsGravity:kCAGravityBottomLeft];
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]