The new file defines GDK_DISABLE_DEPRECATION_WARNINGS so it can happily
use deprecated APIs.
This commit moves those functions there that use deprecated functions
and currently cause warnings.
With this commit, GDK compiles without deprecation warnings.
gdk_x11_device_manager_core_list_devices returns a new allocated
list, which has to be freed.
valgrind output:
==18686== 160,176 (80,088 direct, 80,088 indirect) bytes in 3,337 blocks are definitely lost in loss record 25,347 of 25,378
==18686== at 0x4C256DD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18686== by 0x6CD7752: g_malloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686== by 0x6CEE2B6: g_slice_alloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686== by 0x6CCB37D: g_list_prepend (in /lib64/libglib-2.0.so.0.3000.0)
==18686== by 0x654CADA: gdk_x11_device_manager_core_list_devices (gdkdevicemanager-core-x11.c:836)
==18686== by 0x6531489: gdk_display_pointer_is_grabbed (gdkdisplay.c:1270)
==18686== by 0x5162E1E: filter_func (ui.c:140)
==18686== by 0x6558B50: gdk_event_apply_filters (gdkeventsource.c:83)
==18686== by 0x6558CB3: _gdk_x11_display_queue_events (gdkeventsource.c:197)
==18686== by 0x6530680: gdk_display_get_event (gdkdisplay.c:311)
==18686== by 0x65589F1: gdk_event_source_dispatch (gdkeventsource.c:356)
==18686== by 0x6CD0A0E: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
https://bugzilla.gnome.org/show_bug.cgi?id=660676
GDK_NATIVE_WINDOWS was a way to keep some old apps running that did weird
things in gtk2. We should not have to carry this forwards in gtk 3.x.
We do however keep a g_warning() call reminding people of this fact to
ease debugging when they try to port their applications.
https://bugzilla.gnome.org/show_bug.cgi?id=644119
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().
... 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
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.
There's no usecase for them, so remove them before we have to commit to
keeping an API.
Make the hooks private for now, actually removing them will come in
followup patches.
Its usecase was GERD - http://testbit.eu/~timj/historic/gerd/ - and that
project is long since dead.
I couldn't find any app using it after asking around and googling either.
Its usecase was GERD - http://testbit.eu/~timj/historic/gerd/ - and that
project is long since dead.
It has been superseded in GTK 2.2 by GdkDisplayPointerHooks anyway.
We want to have different window types for different displays, so we can
write code like this:
#if GDK_WINDOWING_X11
if (GDK_IS_X11_WINDOW (window))
{
/* do x11 stuff */
}
else
#endif
#if GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_WINDOW (window))
{
/* do wayland stuff */
}
else
#endif
{
/* do stuff for unsupported system */
}
This requires different GdkWindow types and we currently don't have
that, as only the GdkWindowImpl differs. With this method, every backend
defines a custom type that's just a simple subclass of GdkWindow. This
way GdkWindow behaves like all the other types (visuals, screens,
displays) and we can write code like the above.
This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.
The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
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.
Add a GdkDisplay::get_app_launch_context vfunc, and a
gdk_display_get_app_launch_context that for X11 returns a subclass.
For win32 and quartz, the implementations were trivial, so we
just return a new GdkAppLaunchContext without subclassing. Since
the type of the context now depends on the display,
gdk_app_launch_context_set_display is deprecated.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.