summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2021-01-29 16:21:09 +0000
committerJonas Ådahl <jadahl@gmail.com>2021-01-29 16:21:09 +0000
commitddb9bae3d460dbeeac89d9ee9cac2d367706e5f1 (patch)
tree41a774479a364ed2b11339002bcda71201bf6be2
parenta8c12a4c96f4abb9eb6f666d0e84caccb739551a (diff)
parent9459be11a9a0dc271cb43420b9e21c8740d525fd (diff)
downloadgtk+-ddb9bae3d460dbeeac89d9ee9cac2d367706e5f1.tar.gz
Merge branch 'gtk-surface-release-3-24' into 'gtk-3-24'
Support gtk-shell surface release destructor See merge request GNOME/gtk!2074
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c2
-rw-r--r--gdk/wayland/gdkwindow-wayland.c6
-rw-r--r--gdk/wayland/protocol/gtk-shell.xml7
3 files changed, 11 insertions, 4 deletions
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index dfb8d3069a..7e924fde99 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -84,7 +84,7 @@
#define MIN_SYSTEM_BELL_DELAY_MS 20
-#define GTK_SHELL1_VERSION 3
+#define GTK_SHELL1_VERSION 4
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 811b37ce5c..8d14db56f0 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -3335,7 +3335,11 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
if (impl->display_server.gtk_surface)
{
- gtk_surface1_destroy (impl->display_server.gtk_surface);
+ if (display_wayland->gtk_shell_version >=
+ GTK_SURFACE1_RELEASE_SINCE_VERSION)
+ gtk_surface1_release (impl->display_server.gtk_surface);
+ else
+ gtk_surface1_destroy (impl->display_server.gtk_surface);
impl->display_server.gtk_surface = NULL;
impl->application.was_set = FALSE;
}
diff --git a/gdk/wayland/protocol/gtk-shell.xml b/gdk/wayland/protocol/gtk-shell.xml
index fb91940b30..1aab593c42 100644
--- a/gdk/wayland/protocol/gtk-shell.xml
+++ b/gdk/wayland/protocol/gtk-shell.xml
@@ -1,6 +1,6 @@
<protocol name="gtk">
- <interface name="gtk_shell1" version="3">
+ <interface name="gtk_shell1" version="4">
<description summary="gtk specific extensions">
gtk_shell is a protocol extension providing additional features for
clients implementing it.
@@ -35,7 +35,7 @@
</request>
</interface>
- <interface name="gtk_surface1" version="3">
+ <interface name="gtk_surface1" version="4">
<request name="set_dbus_properties">
<arg name="application_id" type="string" allow-null="true"/>
<arg name="app_menu_path" type="string" allow-null="true"/>
@@ -82,6 +82,9 @@
<request name="request_focus" since="3">
<arg name="startup_id" type="string" allow-null="true"/>
</request>
+
+ <!-- Version 4 additions -->
+ <request name="release" type="destructor" since="4"/>
</interface>
</protocol>