diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2020-12-05 11:30:45 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2020-12-07 20:37:29 +0100 |
commit | c791185c20c90d0bc3d2a7d329834bd4a81800a9 (patch) | |
tree | 6722ed971a874f39aa4140c8fa042ed2c168316d | |
parent | e7ddaf5ed15ac324593879d0ff0ace339b06f6da (diff) | |
download | gtk+-c791185c20c90d0bc3d2a7d329834bd4a81800a9.tar.gz |
x11/surface: Remember the toplevel layout
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdksurface-x11.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 8c65183f5d..b5db385093 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -1580,6 +1580,7 @@ gdk_x11_surface_hide (GdkSurface *surface) NextRequest (GDK_SURFACE_XDISPLAY (surface))); g_clear_handle_id (&impl->compute_size_source_id, g_source_remove); + g_clear_pointer (&impl->toplevel_layout, gdk_toplevel_layout_unref); gdk_x11_surface_withdraw (surface); } @@ -5054,6 +5055,9 @@ gdk_x11_toplevel_present (GdkToplevel *toplevel, gdk_x11_surface_unminimize (surface); + g_clear_pointer (&impl->toplevel_layout, gdk_toplevel_layout_unref); + impl->toplevel_layout = gdk_toplevel_layout_copy (layout); + monitor = gdk_display_get_monitor_at_surface (display, surface); if (monitor) { diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h index 994d125036..134ebdf617 100644 --- a/gdk/x11/gdksurface-x11.h +++ b/gdk/x11/gdksurface-x11.h @@ -72,6 +72,8 @@ struct _GdkX11Surface int unscaled_width; int unscaled_height; + GdkToplevelLayout *toplevel_layout; + struct { int configured_width; int configured_height; |