From 21ff87d72b44604d348cf71da3175b85ac5b2f75 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 27 Sep 2018 22:44:57 +1000 Subject: Improve CSD logic This does the following: * Removes the xdg-decoration surface_commit listener. I was under the impression the client could ignore the server's preference and set whatever decoration they like using this protocol, but I don't think that's right. * Adds a listener for the xdg-decoration request_mode signal. The protocol states that the server should respond to this with its preference. We'll always respond with SSD here. * Makes it so tiled views which use CSD will still have sway decorations rendered. To do this, using_csd had to be added back to the view struct, and the border is changed when floating or unfloating a view. --- sway/tree/container.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sway/tree/container.c') diff --git a/sway/tree/container.c b/sway/tree/container.c index d75e34a5..9b671c1d 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -669,6 +669,9 @@ void container_set_floating(struct sway_container *container, bool enable) { container_init_floating(container); if (container->view) { view_set_tiled(container->view, false); + if (container->view->using_csd) { + container->view->border = B_CSD; + } } if (old_parent) { container_reap_empty(old_parent); @@ -695,6 +698,9 @@ void container_set_floating(struct sway_container *container, bool enable) { } if (container->view) { view_set_tiled(container->view, true); + if (container->view->using_csd) { + container->view->border = container->view->saved_border; + } } container->is_sticky = false; } -- cgit v1.2.3