summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-21 22:43:33 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-01-21 22:45:47 -0500
commit6c54abeca719cb98d6ce84c0c03114b426cb1c51 (patch)
tree1578ad491cec82850425ab13a81061d12e70018f /gdk
parentd24b8a094ce068524371315ca89b7ca5eaa2817f (diff)
downloadgtk+-6c54abeca719cb98d6ce84c0c03114b426cb1c51.tar.gz
wayland: Explicitly announce ssd for kwin
Without this, kwin correctly assumes that we are using client-side decorations. This is a port of 32ae97f1 from GTK 3.24. Fixes: #3609
Diffstat (limited to 'gdk')
-rw-r--r--gdk/wayland/gdksurface-wayland.c18
-rw-r--r--gdk/wayland/gdksurface-wayland.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index c114c04f29..0fd1b82a9b 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2223,6 +2223,24 @@ gdk_wayland_toplevel_announce_csd (GdkToplevel *toplevel)
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_CLIENT);
}
+void
+gdk_wayland_toplevel_announce_ssd (GdkToplevel *toplevel)
+{
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (GDK_SURFACE (toplevel)));
+ GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (toplevel);
+
+ g_return_if_fail (GDK_IS_WAYLAND_TOPLEVEL (toplevel));
+
+ if (!display_wayland->server_decoration_manager)
+ return;
+ impl->display_server.server_decoration =
+ org_kde_kwin_server_decoration_manager_create (display_wayland->server_decoration_manager,
+ impl->display_server.wl_surface);
+ if (impl->display_server.server_decoration)
+ org_kde_kwin_server_decoration_request_mode (impl->display_server.server_decoration,
+ ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER);
+}
+
gboolean
gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel)
{
diff --git a/gdk/wayland/gdksurface-wayland.h b/gdk/wayland/gdksurface-wayland.h
index b0d0d6fc19..8efa4be04d 100644
--- a/gdk/wayland/gdksurface-wayland.h
+++ b/gdk/wayland/gdksurface-wayland.h
@@ -33,6 +33,7 @@ void gdk_wayland_toplevel_set_dbus_properties (GdkTopl
const char *unique_bus_name);
void gdk_wayland_toplevel_announce_csd (GdkToplevel *toplevel);
+void gdk_wayland_toplevel_announce_ssd (GdkToplevel *toplevel);
gboolean gdk_wayland_toplevel_inhibit_idle (GdkToplevel *toplevel);
void gdk_wayland_toplevel_uninhibit_idle (GdkToplevel *toplevel);