[gtk+] win32: Record the native event mask in use
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Record the native event mask in use
- Date: Thu, 10 Nov 2011 16:47:37 +0000 (UTC)
commit 73c527aef028711f40456bb650ff522caaf11528
Author: Alexander Larsson <alexl redhat com>
Date: Wed Oct 19 21:36:41 2011 +0200
win32: Record the native event mask in use
gdk/win32/gdkwindow-win32.c | 16 ++++++++++++----
gdk/win32/gdkwindow-win32.h | 2 ++
2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index a8f1cbc..db2b04e 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -571,7 +571,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
if (!title || !*title)
title = "";
- window->event_mask = GDK_STRUCTURE_MASK | event_mask;
+ impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
@@ -2028,21 +2028,29 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display,
static GdkEventMask
gdk_win32_window_get_events (GdkWindow *window)
{
+ GdkWindowImplWin32 *impl;
+
if (GDK_WINDOW_DESTROYED (window))
return 0;
- return window->event_mask;
+ impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
+
+ return impl->native_event_mask;
}
static void
gdk_win32_window_set_events (GdkWindow *window,
- GdkEventMask event_mask)
+ GdkEventMask event_mask)
{
+ GdkWindowImplWin32 *impl;
+
+ impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
+
/* gdk_window_new() always sets the GDK_STRUCTURE_MASK, so better
* set it here, too. Not that I know or remember why it is
* necessary, will have to test some day.
*/
- window->event_mask = GDK_STRUCTURE_MASK | event_mask;
+ impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
}
static void
diff --git a/gdk/win32/gdkwindow-win32.h b/gdk/win32/gdkwindow-win32.h
index 910d735..8aad9d3 100644
--- a/gdk/win32/gdkwindow-win32.h
+++ b/gdk/win32/gdkwindow-win32.h
@@ -65,6 +65,8 @@ struct _GdkWindowImplWin32
gint hint_flags;
GdkGeometry hints;
+ GdkEventMask native_event_mask;
+
GdkWindowTypeHint type_hint;
gboolean extension_events_selected;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]