~kennylevinsen/greetd-devel

gtkgreet: Use layer-shell anchors to fill the screen v1 APPLIED

Aleksei Bavshin: 1
 Use layer-shell anchors to fill the screen

 1 files changed, 4 insertions(+), 8 deletions(-)
#399992 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kennylevinsen/greetd-devel/patches/19641/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gtkgreet] Use layer-shell anchors to fill the screen Export this patch

The change fixes interactions with other layer-shell windows and allows
to react to output size changes automatically.
---
 gtkgreet/window.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/gtkgreet/window.c b/gtkgreet/window.c
index 6889b6a..86e6223 100644
--- a/gtkgreet/window.c
+++ b/gtkgreet/window.c
@@ -41,14 +41,10 @@ static void window_set_focus(struct Window *win, struct Window *old);
        gtk_layer_set_layer(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_LAYER_TOP);
        gtk_layer_set_monitor(GTK_WINDOW(ctx->window), ctx->monitor);
        gtk_layer_auto_exclusive_zone_enable(GTK_WINDOW(ctx->window));
        gtk_layer_set_margin(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_LEFT, 0);
        gtk_layer_set_margin(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_RIGHT, 0);
        gtk_layer_set_margin(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_TOP, 0);
        gtk_layer_set_margin(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_BOTTOM, 0);

        GdkRectangle rect;
        gdk_monitor_get_workarea(ctx->monitor, &rect);
        gtk_widget_set_size_request(ctx->window, rect.width, rect.height);
        gtk_layer_set_anchor(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_LEFT, TRUE);
        gtk_layer_set_anchor(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_RIGHT, TRUE);
        gtk_layer_set_anchor(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_TOP, TRUE);
        gtk_layer_set_anchor(GTK_WINDOW(ctx->window), GTK_LAYER_SHELL_EDGE_BOTTOM, TRUE);
    }

#endif
-- 
2.28.0
Applied, thanks!