[broadway] Correctly track remote visible state

GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need
to track real visibility ourselves.
This commit is contained in:
Alexander Larsson 2011-04-11 11:56:22 +02:00
parent 33d16b16c9
commit 7b3b4a6ad9
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -60,6 +60,7 @@ struct _GdkWindowImplBroadway
int id;
gboolean visible;
int transient_for;
gint8 toplevel_window_type;