summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c1
-rw-r--r--gdk/wayland/gdkdisplay-wayland.h1
-rw-r--r--gdk/wayland/gdkseat-wayland.c2
-rw-r--r--gdk/wayland/gdksurface-wayland.c6
4 files changed, 4 insertions, 6 deletions
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 0dc9c72361..5c43814b6d 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -370,7 +370,6 @@ gdk_registry_handle_global (void *data,
display_wayland->compositor =
wl_registry_bind (display_wayland->wl_registry, id,
&wl_compositor_interface, MIN (version, 5));
- display_wayland->compositor_version = MIN (version, 4);
}
else if (strcmp (interface, "wl_shm") == 0)
{
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index 56e9e469b8..e143165c36 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -133,7 +133,6 @@ struct _GdkWaylandDisplay
GSource *event_source;
- int compositor_version;
int seat_version;
int data_device_manager_version;
int gtk_shell_version;
diff --git a/gdk/wayland/gdkseat-wayland.c b/gdk/wayland/gdkseat-wayland.c
index 0c19424749..9f9cc57df1 100644
--- a/gdk/wayland/gdkseat-wayland.c
+++ b/gdk/wayland/gdkseat-wayland.c
@@ -3771,7 +3771,7 @@ pointer_surface_update_scale (GdkDevice *device)
guint32 scale;
GSList *l;
- if (display_wayland->compositor_version < WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
+ if (wl_compositor_get_version (display_wayland->compositor) < WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
{
/* We can't set the scale on this surface */
return;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 13e8195577..9374685dbd 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -426,7 +426,7 @@ gdk_wayland_surface_update_scale (GdkSurface *surface)
guint32 scale;
GSList *l;
- if (display_wayland->compositor_version < WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
+ if (wl_compositor_get_version (display_wayland->compositor) < WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
{
/* We can't set the scale on this surface */
return;
@@ -524,7 +524,7 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
g_object_ref (surface);
/* More likely to be right than just assuming 1 */
- if (display_wayland->compositor_version >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
+ if (wl_compositor_get_version (display_wayland->compositor) >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
{
GdkMonitor *monitor = g_list_model_get_item (gdk_display_get_monitors (display), 0);
if (monitor)
@@ -792,7 +792,7 @@ gdk_wayland_surface_sync_buffer_scale (GdkSurface *surface)
/* Only set the buffer scale if supported by the compositor */
display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
- if (display->compositor_version >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
+ if (wl_compositor_get_version (display->compositor) >= WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION)
wl_surface_set_buffer_scale (impl->display_server.wl_surface, impl->scale);
impl->buffer_scale_dirty = FALSE;