summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/broadway/gdkwindow-broadway.c6
-rw-r--r--gdk/broadway/gdkwindow-broadway.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index fd663a1d2e..1cd5425596 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -229,7 +229,9 @@ _gdk_broadway_resync_windows (void)
window->window_type == GDK_WINDOW_TEMP);
if (impl->transient_for)
broadway_output_set_transient_for (display->output, impl->id, impl->transient_for);
- if (GDK_WINDOW_IS_MAPPED (window))
+ /* Can't check GDK_WINDOW_IS_MAPPED here, because that doesn't correctly handle
+ withdrawn windows like menus */
+ if (impl->visible)
{
broadway_output_show_surface (display->output, impl->id);
window_data_send (display->output, impl);
@@ -521,6 +523,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
GdkBroadwayDisplay *broadway_display;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
+ impl->visible = TRUE;
if (window->event_mask & GDK_STRUCTURE_MASK)
_gdk_make_event (GDK_WINDOW (window), GDK_MAP, NULL, FALSE);
@@ -543,6 +546,7 @@ gdk_window_broadway_hide (GdkWindow *window)
GdkBroadwayDisplay *broadway_display;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
+ impl->visible = FALSE;
if (window->event_mask & GDK_STRUCTURE_MASK)
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
diff --git a/gdk/broadway/gdkwindow-broadway.h b/gdk/broadway/gdkwindow-broadway.h
index 0b3c857429..a104b28b97 100644
--- a/gdk/broadway/gdkwindow-broadway.h
+++ b/gdk/broadway/gdkwindow-broadway.h
@@ -60,6 +60,7 @@ struct _GdkWindowImplBroadway
int id;
+ gboolean visible;
int transient_for;
gint8 toplevel_window_type;