Matthias Clasen
eaba2cd468
XI2: translate group state back into core state
...
This is necessary to make the key event translation work
as expected.
https://bugzilla.gnome.org/show_bug.cgi?id=641367
2011-02-04 21:11:40 -05:00
Matthias Clasen
d4c1dbe3d7
Pass group state to _gdk_x11_device_xi2_translate_state
...
This will be necessary to make groups work with XI2.
2011-02-04 21:11:40 -05:00
Matthias Clasen
2c352f51a0
Share code to fill GdkEventKey.string
...
This code was duplicated between the core and XI2 device manager
implementations.
2011-02-04 21:11:40 -05:00
Matthias Clasen
9ba009a8eb
Remove debug spew
2011-02-04 14:05:22 -05:00
Matthias Clasen
272aa7bc55
XI2: don't translate button releases as scroll events
...
This fixes scroll-by-2 sympoms seen in combo boxes.
https://bugzilla.gnome.org/show_bug.cgi?id=639846
2011-02-04 12:54:44 -05:00
Benjamin Otte
7b5ad65e71
x11: Use Window isntead of GdkNativeWindow
2011-02-01 18:51:57 +01:00
Benjamin Otte
44c02fcbb1
API: gdk: Change get_drag_window() API
...
The previous function gdk_drag_get_protocol_for_display() took native
window handles, so it had to be changed. Because it didn't do what it
was named to do (it didn't return a protocol even though it was named
get_protocol) and because it doesn't operate on the display anymore but
on the actual window, it's now called gdk_window_get_drag_protocol().
2011-02-01 18:51:57 +01:00
Benjamin Otte
5bc04bc07b
API: gdk: Make GdkEventSelection.requestor a GdkWindow
...
instead of a GdkNativeWindow. Also change gdk_selection_notify() API to
take a GdkWindow to match this change.
2011-02-01 18:51:57 +01:00
Benjamin Otte
c2a5d715d5
x11: Use gdk_x11_window_foreign_new_for_display() unconditionally
...
gdk_x11_window_lookup_window() calls are done by this function alreayd,
so no need to do them manually.
2011-02-01 18:51:57 +01:00
Matthias Clasen
5441ecd350
Fix a warning
2011-02-01 09:48:32 -05:00
Matthias Clasen
38045e789c
Remove a dead member
...
The client_pointer field in GdkX11DeviceManagerXI2 is not used anywhere.
2011-02-01 09:44:33 -05:00
Matthias Clasen
c79413a1df
Make xim work with XI2
...
We cannot totally ignore core key events, since XFilterEvent generates
those at times and relies on them having an effect.
https://bugzilla.gnome.org/show_bug.cgi?id=640965
2011-02-01 09:42:53 -05:00
Benjamin Otte
c332ac207a
gdk: Remove GdkEventClient
...
... and all APIs making use of it.
That code like it hasn't been touched in years, Google codesearch
didn't find any users and most importantly it's a horrendous API, so
let's just make it die instead of having to port it over to
non-GdkNativeWindow usage, which would be required for multi-backend
GDK.
http://mail.gnome.org/archives/gtk-devel-list/2011-January/msg00049.html
2011-02-01 06:33:02 +01:00
Benjamin Otte
8ecd420ede
x11: Do dnd event handling via gdk_window_add_filter()
2011-02-01 06:33:02 +01:00
Benjamin Otte
180cd853fc
x11: Use macros for byte order to set byte order
...
No need to run sophisticated functions to guess it.
2011-02-01 06:33:02 +01:00
Benjamin Otte
609ddee632
x11: Register wm_protocols function with gdk_window_add_filter()
...
The client message code is about to go away, so we need to use a
different way to get at ClientMessage output.
2011-02-01 06:33:01 +01:00
Benjamin Otte
e67347a3c8
x11: Fill in event->any.window before calling filter functions
...
a) We advertise it for GdkFilterFunc
b) It's necessary to differentiate between different event types with
multi-backend GTK.
2011-02-01 06:33:01 +01:00
Benjamin Otte
d217f4d09e
x11: Handle motif client message filter just like xdnd filters
2011-02-01 06:33:01 +01:00
Benjamin Otte
14cb485d22
x11: Use event->any.window instead of any random member
2011-02-01 06:33:01 +01:00
Matthias Clasen
b52db73f59
Deal gracefully with unowned selections
...
If a selection looses its owner without a replacement, owner is
None, which we did not handle very well.
https://bugzilla.gnome.org/show_bug.cgi?id=641042
2011-01-31 19:35:51 -05:00
Benjamin Otte
9864445b1f
API: gdk: Change GdkEventOwnerChange to not take GdkNativeWindow
...
Use GdkWindow instead. This requires calling
gdk_x11_window_foreign_new_for_display(), so might cause a slight
performance penalty, but is required to be portable.
2011-01-31 07:17:31 +01:00
Matthias Clasen
61f8dbc245
Silence compiler warnings
2011-01-30 01:40:51 -05:00
Matthias Clasen
b1be543ba5
Use free() to free XIButtonState.mask
...
XIQueryPointer() allocates it using malloc() (without any mention
in the documentation...).
2011-01-29 23:27:36 -05:00
Benjamin Otte
ef1606604c
x11: Use Window instead of GdkNativeWindow
2011-01-28 17:06:07 +01:00
Benjamin Otte
bd4ef49af9
API: x11: Add GDK_POINTER_TO_XID() and GDK_XID_TO_POINTER()
...
Previously people used GDK_GPOINTER_TO_NATIVE_WINDOW() for this, but
native windows are going away, so we need a replacement.
2011-01-28 17:06:07 +01:00
Matthias Clasen
454c36523a
Silence new gcc warnings
...
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 18:50:09 -05:00
Carlos Garnacho
0cc2f93d5c
Free button_state.mask after XIQueryPointer()
...
This function allocates the button mask, so free it after
use, or right before the next XIQueryPointer() call, as done
in gdk_x11_device_xi2_window_at_position().
2011-01-23 23:19:30 +01:00
Carlos Garnacho
b2b73a349e
Fix valgrind warning about uninitialized value
...
mods_state->effective is not being set in XIQueryPointer() currently, so
use base|latched|locked instead, effective is nothing else than a shorthand
for these ORs, and these 3 values are set correctly anytime.
2011-01-23 23:14:53 +01:00
Matthias Clasen
eab3d94a43
Expose gtk-auto-mnemonics as an Xsetting
2011-01-22 23:48:39 -05:00
Matthias Clasen
9d34a9cc65
checksettings: succeed quietly
2011-01-22 23:47:01 -05:00
Benjamin Otte
7013406167
x11: Don't keep two lists of devices internally
2011-01-21 02:54:09 +01:00
Johan Dahlin
7ad7c61678
Mark api with xlib types as skipped
...
Since they'd need to have boxed type to be able to work
for introspection based bindings
2011-01-20 12:12:22 -02:00
Pavel Holejsovsky
2fb1c06402
[GI] Add missing (out) and (array) annotations
2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b
[GI] Add missing (transfer) annotations
2011-01-20 13:57:18 +01:00
Matthias Clasen
bb7662392d
Don't set the default display to NULL
...
This was causing segfaults if DISPLAY is unset
2011-01-18 09:36:59 -05:00
Tristan Van Berkom
d9ebdb7610
Plugged memory leak in gdk_x11_device_manager_xi2_list_devices.
...
This was simply a misplaced 'g_list_copy()'.
2011-01-16 22:47:12 +09:00
Matthias Clasen
c97652aeb4
Decouple GdkWindowCache life-cycle from GdkX11DragContext
...
By making window caches refcounted. This fixes problems with leaking
drag contexts, as experienced in
https://bugzilla.gnome.org/show_bug.cgi?id=637691
and
https://bugzilla.gnome.org/show_bug.cgi?id=144324
Based on a patch by drago01@gmail.com
2011-01-04 19:30:04 -05:00
Julien Cristau
d211c8af6b
gdk/x11: don't select RANDR events if the extension is missing
...
Prevents an Xlib warning on Xnest, or Xorg with xinerama, or other
non-RANDR-capable xserver. Reintroduce a have_randr12 field in
GdkDisplayX11 to avoid having to call XRRQuery{Extension,Version} twice,
and don't select randr 1.2 events if that's false.
https://bugzilla.gnome.org/show_bug.cgi?id=634711
Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-01-03 12:13:30 -05:00
Nguyễn Thái Ngọc Duy
cf752786f3
gdkdnd-x11.c: fix building without HAVE_XCOMPOSITE
...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2011-01-02 23:40:00 -05:00
Nguyễn Thái Ngọc Duy
98a30bbf3e
gdkcursor-x11.c: fix building without HAVE_XCURSOR
...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2011-01-02 23:39:55 -05:00
Matthias Clasen
1a87dfdf6d
Fix list handling in gdk_x1_display_init_input
...
Pointed out in bug 638386.
2011-01-02 21:41:30 -05:00
Matthias Clasen
48b47971b5
Fix some issues with initial setup of GdkX11DisplayManager
...
We need to defer setting the default display until the
GdkDisplay is fully initialized. Also, short-circuit some
encoding conversions when creating windows, to avoid an
implicit dependency on the display being in the list of
displays yet.
2010-12-27 01:02:52 -05:00
Matthias Clasen
27ce9421d0
Fix up GDK docs
2010-12-25 00:02:39 -05:00
Matthias Clasen
29eb3fba5f
Fix gdk_x11_display_text_property_to_text_list
...
This was an incomplete attempt to get rid of the custom free function.
Lets just keep it for now. Bug 637849, patch by Dan Winship.
Also add a test case for this function.
2010-12-24 16:27:31 -05:00
Matthias Clasen
2f3c7da763
Remove a duplicate doc comment
2010-12-22 17:47:00 +01:00
Matthias Clasen
b824cdd6db
Fix a blunder in grab handling
...
This was causing segfaults which would go away when compiled with
debug options.
2010-12-21 18:42:30 -05:00
Matthias Clasen
3ca69937f4
Don't install headers twice
2010-12-21 16:37:16 -05:00
Matthias Clasen
82fe7594f9
More include shuffling; keep X extension headers to ourselves
2010-12-21 14:17:02 -05:00
Matthias Clasen
f9e876e265
Fix another typo
2010-12-21 12:32:34 -05:00
Matthias Clasen
b3bd184274
Fix a silly typo
2010-12-21 12:19:03 -05:00