Commit Graph

153 Commits

Author SHA1 Message Date
Edward Sheldrake
f77b690e26 GDK X11 DND: Fix infinite loop
Related: https://bugzilla.gnome.org/show_bug.cgi?id=664646
2012-05-14 23:02:23 -04:00
Benjamin Otte
826360a214 x11: Add suggested braces around empty body in 'if' statements 2012-04-07 13:01:24 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
266866e82c Fix problems with DND on some X servers
When the X server does not support the shape extension (as some
vnc implementations seem to), our DND code was always seeing
an empty input shape, so drops always missed their target.

http://bugzilla.gnome.org/show_bug.cgi?id=620240
2012-01-03 10:57:53 -05:00
Matthias Clasen
879202b9c2 GdkX11DragContext: Struct packing improvements 2011-04-12 12:13:55 -04:00
Benjamin Otte
7b5ad65e71 x11: Use Window isntead of GdkNativeWindow 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
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
d217f4d09e x11: Handle motif client message filter just like xdnd filters 2011-02-01 06:33:01 +01: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
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
Matthias Clasen
3fb8c3415b Rename GdkDragContextX11 to GdkX11DragContext 2010-12-21 12:07:09 -05:00
Benjamin Otte
a8b69df376 x11: Rename GdkScreenX11 to GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte
4db086da4b x11: Rename GdkDisplayX11 to GdkX11Display
Also rename all the macros etc.
2010-12-21 12:07:07 -05:00
Benjamin Otte
8e2240f699 x11: Rename GdkDisplayX11 to GdkX11Display 2010-12-21 12:07:07 -05:00
Matthias Clasen
00e2b949eb Reinstate the correct field value 2010-12-21 12:07:03 -05:00
Matthias Clasen
fdabc9585d Drop g[dt]k_set_locale
These functions were essentially just calling setlocale anyway.
The X11 version was also setting a gdk_use_mb variable that
is not used anywhere.
2010-12-21 12:07:02 -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
566abbad25 Rename _gdk_send_xevent to _gdk_x11_display_send_xevent 2010-12-21 12:07:00 -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
Matthias Clasen
fa33839d72 Consistently use per-display error traps in the X11 backend 2010-12-21 12:06:59 -05:00
Matthias Clasen
2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
23a2b42216 Fully initialize the ClientMessage struct
Otherwise we run into warnings from xdnd_status_filter
2010-12-21 12:06:56 -05:00
Matthias Clasen
8e1d320ce9 Rename _gdk_dnd_init
Nonstatic backend-specific functions need an x11 in their name.
2010-12-21 12:06:56 -05:00
Matthias Clasen
c53ec081ce Add vtables for DND
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
2010-12-21 12:06:56 -05:00
Alexander Larsson
ac7d55c948 Convert all gdk_window methods to vtable calls 2010-12-21 12:06:54 -05:00
Benjamin Otte
645d0ac403 API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Benjamin Otte
e724054d19 API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead.

THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Benjamin Otte
3b8aea389d x11: Use window macros instead of drawable macros
GDK_WINDOW_XID() instead of GDK_DRAWABLE_XID()
GDK_WINDOW_XDISPLAY() instead of GDK_DRAWABLE_XDISPLAY()
2010-12-02 20:17:27 +01:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +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
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a7208d675f x11: s/GDK_DRAWABLE_DISPLAY/GDK_WINDOW_DISPLAY 2010-09-26 15:11:31 +02:00
Javier Jardón
9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Matthias Clasen
2ddfaeddad More error trap cleanups
Remove syncs in front of gdk_error_trap_pop() calls, and convert
gdk_error_trap_pop() calls to gdk_error_trap_pop_ignored() in gdk.
2010-09-20 16:40:14 -04:00
Matthias Clasen
6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Sebastian Dröge
560ca1eaad gdk: Only use XComposite if it is available
Fixes build if it isn't available. Bug #629748.
2010-09-15 16:42:57 +02:00
Adel Gadllah
85ae875dcb [GdkWindowCache] Don't ignore the CompositeOverlayWindow
Add the composite overlay window to the cache, as this can be a reasonable Xdnd proxy as well.

This is only done when the screen is composited in order to avoid mapping
the COW. We assume that the CM is using the COW (which is true for pretty
much any CM currently in use).

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2010-09-13 18:20:22 +02:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Cody Russell
8e142788a5 Bug 608218 - GtkOffscreenWindow causes bad window with GtkEntry
We now exit early from gdk_window_register_dnd() to avoid crashing if the
window type is GDK_WINDOW_OFFSCREEN and does not support dnd operations.
This makes it possible to use any dnd-enabled widgets, such as GtkEntry,
within a GtkOffscreenWindow.
2010-06-01 10:32:18 -05:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Tadej Borovšak
ff61948d13 Move documentation to inline comments: GdkWindow
Use examples/gdk to store documentation code examples.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=618498

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-05-14 17:11:51 +02:00
Javier Jardón
8c46ef830b Remove deprecated code from GdkDnd 2010-05-03 01:45:00 +02:00
Javier Jardón
791962e06d Include <X11/Xutil.h> in gdkdnd-x11.c
Otherwise, inclusion of shape.h triggers an unknown type error
for Region, and compile fails, at least in Solaris.

Reported by Philip Brown here:
https://bugzilla.gnome.org/show_bug.cgi?id=615028
2010-04-18 19:54:22 +02:00
Matthias Clasen
9c8dbc292f Minor doc clarification for gdk_drag_begin
Mention that targets is a list of atoms. Bug 611317.
2010-03-08 21:01:30 -05:00
Matthias Clasen
325cbef27e Protect against X errors when clearing the DND cache
This was reported as a problem in bug 609952.
2010-02-23 12:51:44 -05:00