This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.
The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
Use the grab and ungrab vfuncs from the frontend instead of the
_gdk_windowing wrappers, and move some things around accordingly.
Again, only the X11 backend has been updated, other backends
need to be updated to match.
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
Add a GdkDisplay::get_app_launch_context vfunc, and a
gdk_display_get_app_launch_context that for X11 returns a subclass.
For win32 and quartz, the implementations were trivial, so we
just return a new GdkAppLaunchContext without subclassing. Since
the type of the context now depends on the display,
gdk_app_launch_context_set_display is deprecated.
This function may be used to know the hardware device that triggered
an event, it could resort to the master device in the few cases there's
not a direct hardware device to relate to the event (i.e.: crossing events
due to grabs)
trap->end_sequence is the first serial for which we don't
ignore errors anymore, so we know the trap is dead if
end_sequence <= processed_serial.
Bug 629608
Currently fprintf(stderr, ...) is used for X error and X IO errors
(unless compiled with debugging, in which case g_error() is used for
X errors.)
But if an application is redirecting log messages, we really want
X errors to appear in that same log, so it's better to use a g_logv()
variant.
Though g_warning() isn't really appropriate for "lost connection to the
server", G_LOG_LEVEL_INFO isn't part of the "prefixed log levels"
so will produce output without the application name and PID.
https://bugzilla.gnome.org/show_bug.cgi?id=630216
When an error occurs with nested traps in place, only the innermost
trap should have the error code stored in it; outer traps are
shielded by the inner trap.
https://bugzilla.gnome.org/show_bug.cgi?id=629608
* don't lose track of previous X error handler
if nested traps are pushed
* free any remaining traps when display
is finalized
Test will fail unless bug 630032 is closed so
gdk_display_close() works.
https://bugzilla.gnome.org/show_bug.cgi?id=630033
* _gdk_device_set_associated_device() did not allow NULL device
* GdkDisplay should dispose device manager to avoid devices
trying to touch the display in finalize
* GdkDeviceManagerXI did not ref devices in id hash
* GdkDisplayX11 did not ref devices in ->input_devices
* add per-display gdk_x11_display_error_trap_push()
(X11-specific because gdk_error_trap_push() probably
should have been)
* make gdk_error_trap_push() handle only GDK displays
not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
automatically sync only if needed, so manual gdk_flush() is not
required
* add gdk_error_trap_pop_ignored() which just asynchronously
ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
if you use plain pop() and don't need the return value,
the async gdk_error_trap_pop_ignored() should be used
instead. This results in lots of warnings to clean
up in a later patch.
The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.
https://bugzilla.gnome.org/show_bug.cgi?id=629608
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
After a successful grab/ungrab we wait for an xserver
roundtrip until we change the tracked grab in GdkDisplay.
This way that data is always up-to-date wrt events comming in.
This is the first stage in tracking keyboard grabs in the common code.
This lets us handle destroying or unmapping virtual window with a
keyboard grab.
The history before this was kind of twisted as several different
approaches were tested, so that was all squashed into this initial
commit to hide the uninteresting changes and files that were later
removed.
* configure.in: Check for Xrandr 1.3
* gdk/x11/gdkdisplay-x11.[ch]: Rename have_randr12 to have_randr13
and set if if we have randr 1.3
* gdk/x11/gdkscreen-x11.c: Go back to using randr for monitor
information, if we have XRRGetScreenResourcesCurrent.
svn path=/trunk/; revision=22327
Patch by David Alan Gilbert.
* gdk/gdkcursor.h: Add a GDK_BLANK_CURSOR cursor type.
* gdk/x11/gdkcursor-x11.c: Cache font cursors and named cursors.
* gdk/x11/gdkprivate-x11.h:
* gdk/x11/gdkcdisplay-x11.c: Remove cached cursors when a
display if finalized.
svn path=/trunk/; revision=22145
2008-11-30 Christian Dywan <christian@imendio.com>
Bug 559622 – GdkDevice test segfaults
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose):
* gdk/x11/gdkinput.c (gdk_device_class_init), (gdk_device_dispose):
Free and reset device in dispose. Patch by Michael Natterer and myself.
svn path=/trunk/; revision=21834
2008-09-29 Matthias Clasen <mclasen@redhat.com>
Bug 107000 – Add signals to GdkKeymap for monitoring caps_lock, etc.
* gdk/gdk.symbols:
* gdk/gdkkeys.[ch]: Add a new GdkKeymap::state-changed signal, and
a gdk_keymap_get_caps_lock_state function.
* gdk/x11/gdkkeys-x11.c: Implement it here. For now, only emit
state-changed when caps lock lockedness changes.
* gdk/x11/gdkdisplay-x11.c: Also select for modifier lock status
changes in the XkbSelectEventDetails call.
svn path=/trunk/; revision=21545
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Bug 552956 – Should check composite extension version
* gdk/x11/gdkdisplay-x11.c: Check that the version of the
composite extension is at least 0.4.
Patch by Owen Taylor
svn path=/trunk/; revision=21530
* gdk/x11/gdkinput.c: Add a finalize function for device objects,
and call XCloseDevice there.
* gdk/x11/gdkinput-x11.c:
* gdk/x11/gdkdisplay-x11.c: Move freeing of device objects to
the finalize function.
Patch by Caolan McNamara
svn path=/trunk/; revision=21529
2008-01-15 Michael Natterer <mitch@imendio.com>
* gdk/gdkdisplay.h
* gdk/gdkdrawable.h
* gdk/gdkevents.h
* gdk/gdkpango.h
* gdk/gdkregion.h
* gdk/gdkrgb.h
* gdk/gdkwindow.h: made more struct pointer and array parameters
const. GDK should now be constified as far as possible without
breaking source compatibility. Includes some minor cleanup like
indentation and s/nfoo/n_foo/ (bug #508544).
* gdk/gdkdisplay.c
* gdk/gdkdraw.c
* gdk/gdkevents.c
* gdk/gdkpango.c
* gdk/gdkregion-generic.c
* gdk/gdkrgb.c
* gdk/directfb/gdkdisplay-directfb.c
* gdk/directfb/gdkwindow-directfb.c
* gdk/quartz/gdkdisplay-quartz.c
* gdk/quartz/gdkwindow-quartz.c
* gdk/win32/gdkdisplay-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/x11/gdkdisplay-x11.c
* gdk/x11/gdkwindow-x11.c: changed accordingly.
svn path=/trunk/; revision=19372
Thu Dec 13 13:14:50 2007 Søren Sandmann <sandmann@redhat.com>
* Add RandR 1.2 support
- New monitors_changed signal - New API to get width/height of
monitors, and the name of the plug
svn path=/trunk/; revision=19173
Fri Jun 22 00:34:34 2007 Tim Janik <timj@gtk.org>
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_xdisplay): applied
patch from Mark Tiefenbruck to add missing return_if_fail, #449862.
svn path=/trunk/; revision=18215
* gdk/x11/gdkdisplay-x11.c
(gdk_x11_display_broadcast_startup_message): New method to
marshall and send a Startup Notification message. (from #415070)
(gdk_notify_startup_complete_with_id): Use that
svn path=/trunk/; revision=17710
2007-03-13 Emmanuele Bassi <ebassi@gnome.org>
Apply patch by Vytautas Liuolia for changing the startup
notification id on a window in the X11 backend. (#347375)
* gdk/gdk.h:
* gdk/gdkx.h:
* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
and gdk_x11_display_get_startup_notification_id().
* gdk/gdkwindow.h:
* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().
* gtk/gtkwindow.h:
* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
change the startup notification id.
(gtk_window_class_init), (gtk_window_init),
(gtk_window_set_property): Add write-only "startup-id" property
to GtkWindow.
(gtk_window_realize): Set the startup notification id
on a GtkWindow if it's valid.
(gtk_window_map): If we have another valid startup notification
id then finish the notification process.
svn path=/trunk/; revision=17508
2007-01-03 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c:
* gdk/x11/*.c: Apply a patch by Chris Wilson to
avoid spurious valgrind warnings from XSendEvent()
calls. (#392532)
svn path=/trunk/; revision=17044
2006-09-25 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
display->input_windows with g_free(), not g_object_unref()
(#357566, Tommi Komulainen).
Tue Apr 25 10:25:28 2006 Søren Sandmann <sandmann@redhat.com>
* tests/testgtk.c (create_alpha_window): Create 'composited' label.
* tests/testgtk.c (on_composited_changed): New function, change
the label to say whether the screen is composited or not.
* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
composited status change, invalidate the window and propagate the signal;.
* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
if reset_type_hint is TRUE.
* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
the old hints, store a shadow copy in the public window->type_hint
bitfield, otherwise set this field to normal. Set the private
field to the type hint.
* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.
* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
"reset_type_hint" indicating whether the type hint needs to be
reset. New field type_hint containing a GdkWindowTypeHint.
* gtk/gtkwidget.c (propagate_composited_changed): New function to
propagate changes in composited status.
(gtk_widget_class_init): Add composited_changed signal.
* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.
* gtk/gtkwidget.c (gtk_widget_is_composited): New function.
* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.
* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint
* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
the item belongs to a menubar. Set the type_hint appropriately
depending on the outcome.
* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
changed on the attach widget.
* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
set the transient_for property for menus.
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.
* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
transient for the toplevel.
* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
transient-for, for the popup window.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
new window types.
* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
for new window types.
* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
New function called whenever the compositing manager comes and goes.
* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.
* gdk/x11/gdkscreen-x11.c
(_gdk_x11_screen_request_cm_notification, make_cm_atom,
check_is_composited): New functions
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
_gdk_x11_screen_process_owner_change when an
XFixesSelectionNotifyEvent is received.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
_gdk_x11_screen_request_cm_notification() on all screens.
* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
implementation.
* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
'composited-changed'.
* gdk/gdkwindow.h: Add new EWMH window types.
* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-02-19 Matthias Clasen <mclasen@redhat.com>
Support input shapes: (#331070)
* gdk/gdk.symbols:
* gdk/gdkdisplay.h:
* gdk/gdkwindow.h:
* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
(gdk_display_supports_input_shapes): Functions to determine
if a display supports shaped windows or input shapes.
* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
(gdk_window_input_shape_combine_mask):
(gdk_window_set_child_input_shapes):
(gdk_window_merge_child_input_shapes): Input shape versions
of the window shape API.
* gtk/gtk.symbols:
* gtk/gtkwidget.h:
* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
New function to set an input shape on a widget.
2005-11-16 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
function which destroys the display's event source. Also removes
the source from the global display_sources list and unrefs it.
* gdk/x11/gdkprivate-x11.h: declare the function.
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
instead of half-destroying the source here.
2005-11-15 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy
display->xid_ht as late as possible (right before XCloseDisplay)
because it still needs to be around when the display's screens are
finalized. (#85715)
2005-11-10 Michael Natterer <mitch@imendio.com>
Applied patch from maemo-gtk that addresses many issues wrt
display migration and display closing (bug #85715).
* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
default display to NULL when it's closed. Instead set the most
recently opened display as new default (if one exists).
* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
of this callback.
* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
exist before unrefing them.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
is closed, allow destruction of the root window.
* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
dispose(), free stuff that was leaked before.
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
the xsettings_client still exists before destroying it.
* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
X resources.
* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
dispose() implementation.
* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
dispose() and check if it still exists before unrefing it. Set
their pointers to NULL/None *after* upchaining in dispose(),
because X11 implementations of members of the parent class still
need them for their own destruction.
* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
was g_error()ing when finalizing a visual.
* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
get_clipboard_widget() because it would create the widget if it
doesn't exist. Use g_object_get_data() directly instead.
* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
of this callback.
2005-06-27 Matthias Clasen <mclasen@redhat.com>
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize):
Avoid a segfault. (#309054)
* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
fields for grab timestamps.
* gdk/x11/gdkmain-x11.c (gdk_pointer_grab, gdk_keyboard_grab):
Store grab timestamps when grabbing.
* gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard_ungrab)
(gdk_display_pointer_ungrab): Don't unset the grab_window
if the timestamps indicate that the ungrab will fails.
2005-03-15 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
ref_cairo_surface()
* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
function to create_cairo_context()
* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.
* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
not just the pixel.
* tests/testcairo.c: Update for create_cairo_context()
* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
Reimplement in terms of Cairo, bypass the vtable entries.
* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
implementation of draw_trapezoids / draw_glyphs[_transformed].
* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo
* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
gdk_pango_context_get_for_screen() into the backend independent code.
* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
for drawing images.
* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
gdk_draw_rectangle_alpha_libgtk_only.
* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
gdk_pixbuf_set_as_cairo_source()
* gdk/gdk.symbols: Update
* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
gtk/gtk[hv]ruler.c: Convert to Cairo rendering.
* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
radio button style for now to get something more scalable.
* gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
antialiasing/dpi settings.
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-01-19 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/x11/gdkx.h:
* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_user_time):
Add a function to obtain the last user interaction
time. (#163119, Elijah Newren)
2005-01-18 Matthias Clasen <mclasen@redhat.com>
Avoid X errors when running against servers which
implement XRender < 0.4. (#164427, Albert Chin)
* gdk/x11/gdkprivate-x11.h:
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids):
New function to check for trapezoid support in XRender.
(gdk_x11_draw_trapezoids, _gdk_x11_drawable_draw_xtrapezoids):
Use it here.
* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a
separate have_render_with_trapezoids field.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize it.
2004-10-18 Matthias Clasen <mclasen@redhat.com>
Fix#155658, Sebastian Bacher:
* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Add a new
is_leader flag.
* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set wm hints on
leader windows even if they are withdrawn.
(gdk_window_set_group): Mark the new leader window as such. We
never remove the flag again, but that should a) be vanishingly
rare and b) not a problem, since the flag just turns off an
optimization.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Mark the default
leader window as such.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
Sun Jul 11 15:24:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Bug 143330, support update counter spec.
* configure.in: Add check for the Sync extension
* gdk/gdkwindow.h: gdk_window_enable_synchronized_configure() and
gdk_window_configure_finished()
* gtk/gtkwindow.c (gtk_window_move_resize): Call gdk_window_finish_configure().
* gtk/gtkwindow.c (gtk_window_realize): Automatically enable
synchronized configures.
* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store current
and pending counter values.
* gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): New function.
* gdk/x11/gdkwindow-x11.c
(gdk_window_enable_synchronized_configure): New function.
* gdk/x11/gdkwindow-x11.c (gdk_toplevel_x11_free_contents):
Delete update counter.
* gdk/x11/gdkwindow-x11.c (set_wm_protocols): Advertise
_NET_WM_SYNC_REQUEST when Sync is available
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Handle
_NET_WM_SYNC_REQUEST messages
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Save counter
value for use by gdk_window_configure_finished() when receiving
ConfigureNotifies.
* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add use_sync flag
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Check if the XSync
extension is available
* gdk/x11/gdkdisplay-x11.c: Add _NET_WM_SYNC_REQUEST and
_NET_WM_SYNC_REQUEST_COUNTER to list of supported atoms.
* gdk/linux-fb/gdkwindow-fb.c, gdk/win32/gdkwindow-win32.c: Add
stubs for enable_synchronized_configure() and configure_finished()
Fri Jul 9 15:33:55 2004 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: have a dummy case GDK_OWNER_CHANGE in switch
statements to avoid gcc warnings about not all enum values handled.
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): ignore should live in
#ifdef HAVE_XFIXES.
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().