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)
{
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;
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;
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)
/* 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;