spkp

Stacking wayland compositor
git clone git://git.z3bra.org/sp:kp.git
Log | Files | Refs

commit defdbccdad0b990f31f2e45919da191aab87374a
parent 628ab33aeafa8ccd566717c78759c9cd1c3ce493
Author: Willy Goiffon <dev@z3bra.org>
Date:   Fri, 13 Nov 2020 17:59:17 +0100

Setup server-side decorations for GTK

GTK still uses an old protocol to setup decorations, so we must use that
to disable them. This code will hopefully disappear someday.

Diffstat:
Mcompositor.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/compositor.c b/compositor.c @@ -20,6 +20,7 @@ #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_primary_selection_v1.h> +#include <wlr/types/wlr_server_decoration.h> #include <wlr/types/wlr_screencopy_v1.h> #include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_xdg_decoration_v1.h> @@ -1113,6 +1114,7 @@ main(int argc, char *argv[]) char *argv0; const char *socket; struct state server; + struct wlr_server_decoration_manager *decorations; ARGBEGIN { case 'h': @@ -1156,6 +1158,13 @@ main(int argc, char *argv[]) wlr_idle_create(server.dpy); /* + * Legacy protocol to negotiate decorations. Still used by GTKā€¦ + */ + decorations = wlr_server_decoration_manager_create(server.dpy); + wlr_server_decoration_manager_set_default_mode(decorations, + WLR_SERVER_DECORATION_MANAGER_MODE_SERVER); + + /* * Setup callbacks for server-side events */ server.new_window.notify = cb_new_window;