Commit Graph

1550 Commits

Author SHA1 Message Date
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
Matthias Clasen
106047ffa4 Detangle includes for GdkDeviceManager subclasses 2010-12-21 12:07:10 -05:00
Matthias Clasen
b1aaa10b6a Detangle includes for device subclasses 2010-12-21 12:07:10 -05:00
Matthias Clasen
e5090396bf Forgotten file 2010-12-21 12:07:10 -05:00
Matthias Clasen
bd36374413 Rename GdkAppLaunchContextX11 to GdkX11AppLaunchContext 2010-12-21 12:07:10 -05:00
Matthias Clasen
3fb8c3415b Rename GdkDragContextX11 to GdkX11DragContext 2010-12-21 12:07:09 -05:00
Matthias Clasen
fdfabea958 Don't export gdk_x11_cursor_finalize 2010-12-21 12:07:09 -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
e96c193d06 Rename GdkKeymapX11 to GdkX11Keymap
And add a gdkx11keys.h header file.
2010-12-21 12:07:09 -05:00
Matthias Clasen
146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
Benjamin Otte
19699989e5 x11: Add a GdkX11Window class for X11 windows 2010-12-21 12:07:08 -05:00
Benjamin Otte
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
Benjamin Otte
503087dfc9 x11: Export GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte
a8b69df376 x11: Rename GdkScreenX11 to GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte
b154d3abf6 x11: Export GdkX11Visual 2010-12-21 12:07:08 -05:00
Benjamin Otte
d185987ebd x11: Rename GdkVisualX11 to GdkX11Visual 2010-12-21 12:07:08 -05:00
Benjamin Otte
86e0a9aef7 x11: Have a proper GdkVisualX11Class struct 2010-12-21 12:07:08 -05:00
Benjamin Otte
21d8160c57 x11: Export GdkX11Cursor 2010-12-21 12:07:08 -05:00