Commit Graph

4068 Commits

Author SHA1 Message Date
Kristian Høgsberg
7bbc158217 Remove copy of grab enum that's now in wayland core 2011-02-05 16:11:54 -05:00
Kristian Høgsberg
e6c1f5d94d Dont iterate the display if there's nothing to write 2011-02-05 16:11:54 -05:00
Kristian Høgsberg
590f3dfa1f Add Wayland backend 2011-02-05 16:11:54 -05:00
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
08f90b71a2 Add translation entries for more common keysyms
In particular, the XF86 keysyms can benefit from a translation
that strips the prefix.
2011-02-04 15:33:36 -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
Tristan Van Berkom
b51f3ffffc Added set_transient_for() implementation for GdkOffscreenWindow
Just a noop that is better than crashing in the case this is called
(it can be called for a toplevel GtkWindow that is parented into
another widget by setting gtk_widget_set_parent_window to an offscreen
window).
2011-02-03 23:52:12 +09:00
Martin Pitt
0e795b67c3 [GI] Mark mis-detected constructors as such
constructors which take an object of the same class as its first argument are
mis-detected as method call with "self" argument by the GIR scanner. Using the
new (constructor) annotation from bug 561264, mark some of them as proper
constuctors, so that you can call them with NULL as first argument from
bindings; in particular, this fixes gdk_window_new() and the
gtk_radio_button_new_with*() constructors.
2011-02-02 15:11:06 +01:00
John Ralls
cfaed624be Update quartz to reflect deletion of GdkNativeWindow and client_message functions. 2011-02-01 13:53:00 -08:00
Benjamin Otte
5f594b613e API: gdk: Get rid of GdkNativeWindow
Also get rid of the GDK_NATIVE_WINDOW_POINTER define.
2011-02-01 18:51:57 +01: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
9210347600 API: gdk: Make GDK_DRAG_PROTOCOL_NONE equal to 0
THis way, we can do comparisons like "if (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
Kristian Rietveld
73afbc954a Check whether mask is NULL 2011-01-31 23:54:38 +01: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
Matthias Clasen
d981b9ed61 Fix a doc typo 2011-01-28 11:10:07 -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
Carlos Garnacho
8fdd8dbc35 Do not modify associated device for non-master devices on dispose
Only master devices must modify the associated device to separate
a pointer/keyboard pair, slave devices must only call
_gdk_device_remove_slave().

Fixes bug 639767 - password not accepted in gnome-screensaver dialog,
reported by Frederic Crozat. On VT-switch, the X server removes its
grab on HW devices, the effect on clients is that slave devices
disappear, and these were mistakenly mangling the master device
hierarchy. so gdk_device_get_associated_device() on the client
pointer wouldn't return the paired keyboard anymore.

The final effect is that gtkplug-x11 wasn't setting a keyboard to
its generated events.
2011-01-24 19:55:41 +01:00
Carlos Garnacho
94c4a312c1 Add extra checks for GdkDevice functions that might fail on slave devices.
Documentation bits have been added as well.
2011-01-24 02:54:38 +01:00
Carlos Garnacho
5fd5872b37 Avoid toplevel tracking on slave device after ungrab
slave devices don't have coordinates themselves, as they depend
on a master, this only changes if they have a grab in effect,
so only keep toplevel tracking enabled in such situation. Fixes
Bug #640313 - BadDevice X error when ungrabbing a SLAVE device,
noticed by Jesse van den Kieboom.
2011-01-24 02:54:00 +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
Benjamin Otte
51290e0a57 gdk: When reffing the impl surface, ref it from the impl window
This was causing surfaces to be created with the wrong size and that
caused broken clipping.

https://bugzilla.gnome.org/show_bug.cgi?id=640195
2011-01-23 21:41:01 +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
Tomeu Vizoso
e2d42f3c4b [gi] Return value of gdk_window_new should have transfer full 2011-01-21 17:34:18 +01:00
Fridrich Štrba
a79f05c7be fix win32 build after removal of the colormap debug category 2011-01-21 11:20:16 +01:00
Sebastian Pölsterl
8effa1eb0e [gi] Added missing (allow-none) annotation to gdk_device_grab 2011-01-21 10:36:07 +01:00
Matthias Clasen
46903a9100 Fix a crash during DND
https://bugzilla.gnome.org/show_bug.cgi?id=640105
2011-01-20 21:36:50 -05:00
Benjamin Otte
ec750bed0c gdk: Remove colormap debug category
We don't have colormaps anymore.
2011-01-21 02:54:09 +01:00