Commit Graph

1555 Commits

Author SHA1 Message Date
8ecd420ede x11: Do dnd event handling via gdk_window_add_filter() 2011-02-01 06:33:02 +01:00
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
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
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
d217f4d09e x11: Handle motif client message filter just like xdnd filters 2011-02-01 06:33:01 +01:00
14cb485d22 x11: Use event->any.window instead of any random member 2011-02-01 06:33:01 +01:00
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
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
61f8dbc245 Silence compiler warnings 2011-01-30 01:40:51 -05:00
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
ef1606604c x11: Use Window instead of GdkNativeWindow 2011-01-28 17:06:07 +01:00
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
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
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
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
eab3d94a43 Expose gtk-auto-mnemonics as an Xsetting 2011-01-22 23:48:39 -05:00
9d34a9cc65 checksettings: succeed quietly 2011-01-22 23:47:01 -05:00
7013406167 x11: Don't keep two lists of devices internally 2011-01-21 02:54:09 +01:00
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
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
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
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
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
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
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
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
1a87dfdf6d Fix list handling in gdk_x1_display_init_input
Pointed out in bug 638386.
2011-01-02 21:41:30 -05:00
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
27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -05:00
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
2f3c7da763 Remove a duplicate doc comment 2010-12-22 17:47:00 +01:00
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
3ca69937f4 Don't install headers twice 2010-12-21 16:37:16 -05:00
82fe7594f9 More include shuffling; keep X extension headers to ourselves 2010-12-21 14:17:02 -05:00
f9e876e265 Fix another typo 2010-12-21 12:32:34 -05:00
b3bd184274 Fix a silly typo 2010-12-21 12:19:03 -05:00
106047ffa4 Detangle includes for GdkDeviceManager subclasses 2010-12-21 12:07:10 -05:00
b1aaa10b6a Detangle includes for device subclasses 2010-12-21 12:07:10 -05:00
e5090396bf Forgotten file 2010-12-21 12:07:10 -05:00
bd36374413 Rename GdkAppLaunchContextX11 to GdkX11AppLaunchContext 2010-12-21 12:07:10 -05:00
3fb8c3415b Rename GdkDragContextX11 to GdkX11DragContext 2010-12-21 12:07:09 -05:00
fdfabea958 Don't export gdk_x11_cursor_finalize 2010-12-21 12:07:09 -05:00
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
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
e96c193d06 Rename GdkKeymapX11 to GdkX11Keymap
And add a gdkx11keys.h header file.
2010-12-21 12:07:09 -05:00
146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
19699989e5 x11: Add a GdkX11Window class for X11 windows 2010-12-21 12:07:08 -05:00
3036922b3d gdk: Create windows via _gdk_display_create_window()
THe use of this function will become visible in the next commits. But
wrapping g_object_new() is a generally a good idea anyway.
2010-12-21 12:07:08 -05:00
503087dfc9 x11: Export GdkX11Screen 2010-12-21 12:07:08 -05:00