[gtk/wip/chergert/macos-iosurface] macos: try to blend in better with layout system
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-iosurface] macos: try to blend in better with layout system
- Date: Sat, 12 Feb 2022 04:13:46 +0000 (UTC)
commit 43c186fbbf0a56c080904d3d0b578f134071a0ad
Author: Christian Hergert <christian hergert me>
Date: Fri Feb 11 20:10:06 2022 -0800
macos: try to blend in better with layout system
gdk/macos/GdkMacosLayer.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdk/macos/GdkMacosLayer.c b/gdk/macos/GdkMacosLayer.c
index 45b206f1cb..4b723566d0 100644
--- a/gdk/macos/GdkMacosLayer.c
+++ b/gdk/macos/GdkMacosLayer.c
@@ -254,6 +254,8 @@ fromCGRect (const CGRect rect)
if (!self->_inSwapBuffer)
return;
+ self->_layoutInvalid = FALSE;
+
ar = g_array_sized_new (FALSE, FALSE, sizeof (TileInfo), 32);
rect = fromCGRect ([self bounds]);
@@ -321,6 +323,7 @@ fromCGRect (const CGRect rect)
self->_layoutInvalid = TRUE;
[super setFrame:frame];
+ [self setNeedsLayout];
}
-(void)setOpaqueRegion:(const cairo_region_t *)opaqueRegion
@@ -328,6 +331,8 @@ fromCGRect (const CGRect rect)
g_clear_pointer (&self->_opaqueRegion, cairo_region_destroy);
self->_opaqueRegion = cairo_region_copy (opaqueRegion);
self->_layoutInvalid = TRUE;
+
+ [self setNeedsLayout];
}
-(void)swapBuffer:(GdkMacosBuffer *)buffer withDamage:(const cairo_region_t *)damage
@@ -346,8 +351,6 @@ fromCGRect (const CGRect rect)
if (self->_layoutInvalid)
{
- self->_layoutInvalid = FALSE;
-
self->_inSwapBuffer = TRUE;
[self layoutSublayers];
self->_inSwapBuffer = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]