summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-04-11 11:56:22 +0200
committerAlexander Larsson <alexl@redhat.com>2011-04-11 12:09:43 +0200
commit7b3b4a6ad9a8e411130ad0d91c96e8434585d7c4 (patch)
tree2b0b2510a268ee7ff9153e3c7d331481f090c51b /gdk
parent33d16b16c9d1f0c458ff2b8bf2dc3f39769eb613 (diff)
downloadgtk+-7b3b4a6ad9a8e411130ad0d91c96e8434585d7c4.tar.gz
[broadway] Correctly track remote visible state
GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need to track real visibility ourselves.
Diffstat (limited to 'gdk')
-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;