summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-11-17 12:25:56 +0100
committerAlexander Larsson <alexl@redhat.com>2011-11-17 12:25:56 +0100
commit361fcabbde2af6e4c8f785cdf6482f366ba4affe (patch)
tree8e5a6ee77936f636c8507abeec8d9651511325a8 /gdk/win32
parent6690e6dc58f36787ea8a064b0297c932b575f2fe (diff)
downloadgtk+-361fcabbde2af6e4c8f785cdf6482f366ba4affe.tar.gz
win32: make fixup_event correctly ref all GdkWindow members
This fixes some crashes related to owner changes and selections.
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkevents-win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 6fc6f58216..16d81956eb 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -833,6 +833,14 @@ fixup_event (GdkEvent *event)
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.subwindow != NULL))
g_object_ref (event->crossing.subwindow);
+ if (((event->any.type == GDK_SELECTION_CLEAR) ||
+ (event->any.type == GDK_SELECTION_NOTIFY) ||
+ (event->any.type == GDK_SELECTION_REQUEST)) &&
+ (event->selection.requestor != NULL))
+ g_object_ref (event->selection.requestor);
+ if ((event->any.type == GDK_OWNER_CHANGE) &&
+ (event->owner_change.owner != NULL))
+ g_object_ref (event->owner_change.owner);
event->any.send_event = InSendMessage ();
}