[gtk+] Don't emulate map/unmap events for native windows
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Don't emulate map/unmap events for native windows
- Date: Wed, 8 Jul 2009 16:51:21 +0000 (UTC)
commit a90d43bed605f6afb929672d8568be0afbf9408d
Author: Alexander Larsson <alexl redhat com>
Date: Wed Jul 8 18:36:24 2009 +0200
Don't emulate map/unmap events for native windows
We really need to wait for the MapNotify from the xserver to ensure
that the window has been mapped, as it may be delayed by the WM, network
or similar things.
This fixes a problem in the /ui-tests/keys-events gtk test
gdk/gdkwindow.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index d9b1e5b..bd253c7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5805,7 +5805,7 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
if (gdk_window_is_viewable (window))
show_all_visible_impls (private, was_mapped);
- if (!was_mapped)
+ if (!was_mapped && !gdk_window_has_impl (private))
{
if (private->event_mask & GDK_STRUCTURE_MASK)
_gdk_make_event (GDK_WINDOW (private), GDK_MAP, NULL, FALSE);
@@ -6112,7 +6112,7 @@ gdk_window_hide (GdkWindow *window)
/* all decendants became non-visible, we need to send visibility notify */
gdk_window_update_visibility_recursively (private, NULL);
- if (was_mapped)
+ if (was_mapped && !gdk_window_has_impl (private))
{
if (private->event_mask & GDK_STRUCTURE_MASK)
_gdk_make_event (GDK_WINDOW (private), GDK_UNMAP, NULL, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]