From a24c38936e5ca53789f3c75af378bd60f5a03c50 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Fri, 6 Mar 2026 18:22:22 -0800 Subject: [PATCH] toggle of gtk window's update and render when not in CSD mode --- wayland_gtk_egl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wayland_gtk_egl.c b/wayland_gtk_egl.c index 4d32e9c..57870e1 100755 --- a/wayland_gtk_egl.c +++ b/wayland_gtk_egl.c @@ -464,7 +464,10 @@ int main(){ ctx.window.dim[0], ctx.window.dim[1], 0, 0); /* frame update and render */ - csd_gtk_update_and_render(&ctx.window, &ctx.gtk_window, seats, seat_count); + if (ctx.window.config.decoration_mode == + ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE){ + csd_gtk_update_and_render(&ctx.window, &ctx.gtk_window, seats, seat_count); + } /* app update & render */ { @@ -998,6 +1001,9 @@ csd_gtk_window_init(CSD_GTK_Window *gtk_window){ gtk_window->shadow = csd_subsurface_new(); gtk_window->titlebar = csd_subsurface_new(); + wl_subsurface_place_above(gtk_window->titlebar.wl_subsurface, + gtk_window->shadow.wl_surface); + gtk_window->header = gtk_header_bar_new(); gtk_window->window = gtk_offscreen_window_new(); @@ -1176,7 +1182,7 @@ csd_gtk_update_and_render(CSD_Window *window, CSD_GTK_Window *gtk_window, csd_subsurface_commit(subsurface); } - /* draw frame */ + /* draw titlebar */ { CSD_SubSurface *subsurface = >k_window->titlebar;