[gtk+] [broadway] Correctly track remote visible state
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] [broadway] Correctly track remote visible state
- Date: Mon, 11 Apr 2011 10:10:35 +0000 (UTC)
commit 7b3b4a6ad9a8e411130ad0d91c96e8434585d7c4
Author: Alexander Larsson <alexl redhat com>
Date: Mon Apr 11 11:56:22 2011 +0200
[broadway] Correctly track remote visible state
GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need
to track real visibility ourselves.
gdk/broadway/gdkwindow-broadway.c | 6 +++++-
gdk/broadway/gdkwindow-broadway.h | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index fd663a1..1cd5425 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 0b3c857..a104b28 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]