summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-05-18 20:56:54 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-05-18 20:56:54 +0000
commit7b8616bf76e42e7b71543d4da9a3ca8e02c4d0d5 (patch)
tree139d727a115ba783ae0655d52f7835d731548700 /gtk/gtkmain.c
parent261d5404386a176a6a209d3deee08dc9b94f2d1a (diff)
downloadgdk-pixbuf-7b8616bf76e42e7b71543d4da9a3ca8e02c4d0d5.tar.gz
Check for XFIXES extension.
2004-05-18 Matthias Clasen <mclasen@redhat.com> * configure.in: Check for XFIXES extension. * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a gboolean have_xfixes member. * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Register XFIXES events and set have_xfixes. * gdk/gdkevents.h (GdkEventType): Add GDK_OWNER_CHANGE. (GdkEventOwnerChange): New event struct for owner change events. (GdkOwnerChange): New enum for the reason field of GdkEventOwnerChange. * gdk/x11/gdkevents-x11.c (gdk_event_translate): Translate XFixesSelectionNotify events into GdkEventOwnerChange events. * gdk/gdkdisplay.h: * gdk/x11/gdkdisplay-x11.c (gdk_display_supports_selection_notification): (gdk_display_request_selection_notification): New api to support selection ownership notification. * gtk/gtkclipboard.h: * gtk/gtkclipboard.c (_gtk_clipboard_handle_event): New private api to handle owner change events. (clipboard_peek): Refactored out the body of gtk_clipboard_get_for_display() for use in _gtk_clipboard_handle_event(). * gtk/gtkmain.c (gtk_main_do_event): Handle GDK_OWNER_CHANGE events by calling _gtk_clipboard_handle_event().
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 9b301dbfc..d75ff7248 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1438,6 +1438,12 @@ gtk_main_do_event (GdkEvent *event)
return;
}
+ if (event->type == GDK_OWNER_CHANGE)
+ {
+ _gtk_clipboard_handle_event (&event->owner_change);
+ return;
+ }
+
/* Find the widget which got the event. We store the widget
* in the user_data field of GdkWindow's.
* Ignore the event if we don't have a widget for it, except