Merge branch 'surfaceloop' into 'gtk-3-24'
Check if size changed before hiding a surface See merge request GNOME/gtk!3944
This commit is contained in:
@@ -1199,6 +1199,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
gboolean is_xdg_popup;
|
||||
gboolean is_visible;
|
||||
gboolean size_changed;
|
||||
|
||||
impl->unconfigured_width = calculate_width_without_margin (window, width);
|
||||
impl->unconfigured_height = calculate_height_without_margin (window, height);
|
||||
@@ -1206,9 +1207,8 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
if (should_inhibit_resize (window))
|
||||
return;
|
||||
|
||||
if (window->width == width &&
|
||||
window->height == height &&
|
||||
impl->scale == scale)
|
||||
size_changed = (window->width != width || window->height != height);
|
||||
if (!size_changed && impl->scale == scale)
|
||||
return;
|
||||
|
||||
/* For xdg_popup using an xdg_positioner, there is a race condition if
|
||||
@@ -1222,6 +1222,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
|
||||
if (is_xdg_popup &&
|
||||
is_visible &&
|
||||
size_changed &&
|
||||
!impl->initial_configure_received &&
|
||||
!impl->configuring_popup)
|
||||
gdk_window_hide (window);
|
||||
@@ -1230,6 +1231,7 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
|
||||
|
||||
if (is_xdg_popup &&
|
||||
is_visible &&
|
||||
size_changed &&
|
||||
!impl->initial_configure_received &&
|
||||
!impl->configuring_popup)
|
||||
gdk_window_show (window);
|
||||
|
||||
Reference in New Issue
Block a user