forked from AuroraMiddleware/gtk
wayland: Only bind supported unstable pointer gestures global
As the protocol is still considered unstable (meaning not backward compatible), we should, as stated in the protocol, only bind the version advertised is the version we implement. https://bugzilla.gnome.org/show_bug.cgi?id=753856
This commit is contained in:
parent
8026575947
commit
32cd1a7447
@ -358,10 +358,12 @@ gdk_registry_handle_global (void *data,
|
||||
display_wayland->subcompositor =
|
||||
wl_registry_bind (display_wayland->wl_registry, id, &wl_subcompositor_interface, 1);
|
||||
}
|
||||
else if (strcmp (interface, "_wl_pointer_gestures") == 0)
|
||||
else if (strcmp (interface, "_wl_pointer_gestures") == 0 &&
|
||||
version == GDK__WL_POINTER_GESTURES_VERSION)
|
||||
{
|
||||
display_wayland->pointer_gestures =
|
||||
wl_registry_bind (display_wayland->wl_registry, id, &_wl_pointer_gestures_interface, 1);
|
||||
wl_registry_bind (display_wayland->wl_registry,
|
||||
id, &_wl_pointer_gestures_interface, version);
|
||||
}
|
||||
else
|
||||
handled = FALSE;
|
||||
|
@ -45,6 +45,8 @@ G_BEGIN_DECLS
|
||||
#define GDK_WAYLAND_MAX_THEME_SCALE 2
|
||||
#define GDK_WAYLAND_THEME_SCALES_COUNT GDK_WAYLAND_MAX_THEME_SCALE
|
||||
|
||||
#define GDK__WL_POINTER_GESTURES_VERSION 1
|
||||
|
||||
typedef struct _GdkWaylandSelection GdkWaylandSelection;
|
||||
|
||||
struct _GdkWaylandDisplay
|
||||
|
Loading…
Reference in New Issue
Block a user