Commit Graph

27 Commits

Author SHA1 Message Date
Matthias Clasen
89f6b8751e Remove gdk_window_add_filter
Drop the public filtering API. The x11 backend already has
the ::xevent signal as replacement. The win32 backend needs
a similar signal to replace filtering.

Reshuffle header inclusions in the x11 backend a little bit
to avoid a cyclic inclusion between gdkprivate-x11.h and
gdkdisplay-x11.h that is otherwise causing problems.
2018-02-07 15:12:03 -05:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
e151058dff Make gdk logging per-display
As far as possible, use per-display debug flags.

This will minimize the debug spew that we get from
the inspector if it is running on a separate display.
2018-01-14 17:05:04 -05:00
Matthias Clasen
bad53bc201 x11: Stop deriving from GdkDeviceManager
We can just derive from GObject.
2017-11-25 11:04:15 -05:00
Matthias Clasen
4c40accbb9 gdk: Move gdk_disable_multidevice tot he X11 backend
This api only ever did something for X11, so move
it there. Update the docs and adapt the only caller.
2017-11-25 11:04:14 -05:00
Matthias Clasen
2ad19c70ce x11: Don't use g_print for debug output
The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
2016-02-28 21:40:24 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
6abe7a7094 docs: use markdown instead of <note> 2014-02-06 08:01:49 -05:00
Rico Tzschichholz
ed5d9b3c3e x11: Add/Fix '(type *)' g-i annotations 2014-01-09 21:47:04 +01:00
Jasper St. Pierre
002ac992d1 gdkdevicemanager-x11: Request XI2.3
Since XIQueryVersion, the bad API that it is, enforces the version from
the first client that requests it, for clients to be able to use the new
features in XI2.3, we need to ensure that we pass XIQueryVersion 2.3 as
the version that we support. We know that GTK+ won't be confused by the
new features.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:53:39 -05:00
Jasper St. Pierre
e340049eb8 gdkdevicemanager-x11: Always request XI2.2
The X server should fill in the minor version that it supports in the
case where it only supports the older version, so we can safely always
pass a higher version number than is potentially supported by the
server.

libXi was designed to be stable in the case where it doesn't recognize
requests or events/replies, so this should still work in a case where
we have new versions of the X server, and GTK+, but an old version of
libXi, at least for however well that setup should work.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:45:01 -05:00
Javier Jardón
962a5d8b8a Require XInput2.h in X11 backend
Also remove support for XInput.h
2012-03-02 12:52:12 +00:00
Matthias Clasen
f7b7cc22e6 xi2: Translate touch events
Translate XI_TouchBegin/Update/End to GDK_TOUCH_BEGIN/UPDATE/END
events.

At the same time,
set pointer-emulated flags on button events with XIPointerEmulated
and on touch events emulating the pointer.
2012-03-01 16:25:20 -05:00
Carlos Garnacho
fbb0d8e546 xi2: Add major/minor properties to XI2 device manager
This may be used to turn on/off the features that are added to
new XInput2 revisions.
2012-03-01 16:19:57 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Alexandre Rostovtsev
e2053a582a Add Since: to gdk_x11_device_get_id(), gdk_x11_device_manager_lookup(), gdk_x11_window_set_utf8_property() docs
https://bugzilla.gnome.org/show_bug.cgi?id=667730
2012-01-16 18:08:16 -05:00
Carlos Garnacho
6aab48ead0 gdk/x11: Add gdk_x11_device_manager_lookup()
This function can be used to find the GdkDevice wrapping
an XInput2 device ID. For core devices, the Virtual Core
Pointer/Keyboard IDs (2/3) may be used.
2011-07-15 18:14:38 +02:00
Carlos Garnacho
f90c154472 gdk/x11: Add gdk_x11_device_get_id()
This function can be used to find out the XInput2 device ID
behind a GdkDevice, mostly useful when you need to interact
with say Clutter, or raw libXi calls.
2011-07-15 18:14:38 +02:00
Matthias Clasen
106047ffa4 Detangle includes for GdkDeviceManager subclasses 2010-12-21 12:07:10 -05:00
Matthias Clasen
b4802e3042 Rename x11-specific GdkDevice[Manager] implementations
Make them all fit in the gdk_x11_ prefix, and make the
get_type functions and standard macros available in headers.
2010-12-21 12:07:09 -05:00
Matthias Clasen
5cddc7ccbb Rename GdkDevice[Manager]Core to GdkX11Device[Manager]Core
This is mainly to avoid clash with the classes of the same
name in the quartz backend.
2010-12-21 12:07:09 -05:00
Matthias Clasen
214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen
985eb14469 Multiple changes to reduce the amount of unprefixed symbols
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.

The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
2010-12-21 12:07:00 -05:00
Carlos Garnacho
c4a5c2ed4b Enable XI2 by default
gdk_enable_multidevice() has been replaced with gdk_disable_multidevice(),
so applications may call that function if they want to go back at the
previous behavior.

There would be usually little reasons to call that function, unless the
application is doing X calls itself that count on old fashioned core
devices.
2010-12-15 03:17:58 +01:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Havoc Pennington
c7d73ee587 Fix bugs that crashed gdk_display_close() on x11
* _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
2010-09-18 22:57:36 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00