From 68124f60c75fde05d8d3bab6448114228ee16885 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Fri, 17 Jan 2025 20:48:03 +0100 Subject: [PATCH] gtk: don't toggle headerbar on (un)maximize while using SSDs See #5137. We should never display the header bar when using SSDs anyway --- src/apprt/gtk/Window.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 03fcd05db4..59d6437d71 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -640,6 +640,11 @@ fn gtkWindowNotifyMaximized( ) callconv(.C) void { const self = userdataSelf(ud orelse return); const maximized = c.gtk_window_is_maximized(self.window) != 0; + + // Only toggle visibility of the header bar when we're using CSDs, + // and actually intend on displaying the header bar + if (!self.winproto.clientSideDecorationEnabled()) return; + if (!maximized) { self.headerbar.setVisible(true); return;