mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
wayland: Use gtk_shell1_get_version()
... or correct gtk_surface1_get_version() alternative.
This commit is contained in:
parent
9d99259cbd
commit
68b8c5cd99
@ -93,7 +93,7 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
|
||||
id = app_launch_data.token;
|
||||
wl_event_queue_destroy (event_queue);
|
||||
}
|
||||
else if (display->gtk_shell_version >= 3)
|
||||
else if (gtk_shell1_get_version (display->gtk_shell) >= GTK_SHELL1_NOTIFY_LAUNCH_SINCE_VERSION)
|
||||
{
|
||||
id = g_uuid_string_random ();
|
||||
gtk_shell1_notify_launch (display->gtk_shell, id);
|
||||
|
@ -393,7 +393,6 @@ gdk_registry_handle_global (void *data,
|
||||
>k_shell1_interface,
|
||||
MIN (version, GTK_SHELL1_VERSION));
|
||||
gdk_wayland_display_set_has_gtk_shell (display_wayland);
|
||||
display_wayland->gtk_shell_version = version;
|
||||
}
|
||||
else if (strcmp (interface, "wl_output") == 0)
|
||||
{
|
||||
|
@ -134,7 +134,6 @@ struct _GdkWaylandDisplay
|
||||
GSource *event_source;
|
||||
|
||||
int seat_version;
|
||||
int gtk_shell_version;
|
||||
int pointer_gestures_version;
|
||||
|
||||
uint32_t server_decoration_mode;
|
||||
|
@ -217,7 +217,7 @@ gdk_wayland_toplevel_hide_surface (GdkWaylandSurface *wayland_surface)
|
||||
|
||||
if (toplevel->display_server.gtk_surface)
|
||||
{
|
||||
if (display_wayland->gtk_shell_version >= GTK_SURFACE1_RELEASE_SINCE_VERSION)
|
||||
if (gtk_shell1_get_version (display_wayland->gtk_shell) >= GTK_SURFACE1_RELEASE_SINCE_VERSION)
|
||||
gtk_surface1_release (toplevel->display_server.gtk_surface);
|
||||
else
|
||||
gtk_surface1_destroy (toplevel->display_server.gtk_surface);
|
||||
@ -2136,7 +2136,7 @@ gdk_wayland_toplevel_focus (GdkToplevel *toplevel,
|
||||
{
|
||||
if (timestamp != GDK_CURRENT_TIME)
|
||||
gtk_surface1_present (wayland_toplevel->display_server.gtk_surface, timestamp);
|
||||
else if (startup_id && display_wayland->gtk_shell_version >= 3)
|
||||
else if (startup_id && gtk_surface1_get_version (wayland_toplevel->display_server.gtk_surface) >= GTK_SURFACE1_REQUEST_FOCUS_SINCE_VERSION)
|
||||
gtk_surface1_request_focus (wayland_toplevel->display_server.gtk_surface,
|
||||
startup_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user