Hello, I’m curious if it’s possible to configure the window control buttons (close, maximize, minimize) to have zero margin, and therefore to occupy the whole window title bar.
The use case for this: a user could just move the mouse to the upper-right corner of the screen, and be guaranteed that the click would close the currently maximized window.
And this is my biggest gripe with “rounded corners” as well. I should be able to quickly move the mouse to the top right and close a window without even looking. I hate this expression, but “I can do it on Windows.”
My buttons are rounded, but if I click the very top-right of the screen of a maximised window, the close button still works, i.e. it acts as if it has an invisible box around it that works as per your user requirements already. Maybe if yours doesn’t work like this then you’ve got a theme that functions differently. I am using Breeze for everything, bar colours.
if I click the very top-right of the screen of a maximised window, the close button still works
It works with Qt apps, but broken for GTK3 (with CSD) and GTK4 apps
I wish if there is a possibility to add custom close action to screen’s top right edge.
Apps using CSD implement this behavior in app, the system has no control over it. You need to file a bug report against the individual app(s) that do not behave as you expect.
GNOME has the bug open for 8years and they have no intention to fix it, the only hope is via Plasma rich features.
Of course they don’t. In GNOME, the top of the screen is occupied by the (whatever named) system bar, so Fitts’ law doesn’t work, anyway. Perhaps that’s why you never see a maximized window in GNOME screenshots.
And instead of adding a workaround in kwin, I guess it’s better (and less work) to submit a patch to GNOME instead. According to the bug report, GNOME developers are not opposed to the idea. They just don’t want to do it themselves.
I’m failing to understand something, I think - when I push the mouse to the top of the screen (middle, right or left corner) with a maximized window - I get the border resize handlers (even when the window decoration is set to “No Border”).
This is good, in my book, but I still wonder why other people see a different behavior.
With that configuration, indeed the top pixel on the screen activates the relevant buttons. I’ll keep it that way for a while to check how it behaves for me.
@medin , I see you have Breeze with the default configuration of “draw a circle around the close button” - this makes it easier to see which applications use server side decorations - where Plasma decorations obey Fitt’s law - and which are “fakes” that force client side decorations and are doing a bad job at pretending to know what they are doing, and most notably - they aren’t drawing the circle.
BTW - I have set up Firefox and Chrome to use server side decorations: it is the only sane choice, and applications that do not support server side decorations are an anathema that I tolerate for short periods of time and can never be a serious tool for me.
Try Klassy window decoration.
With windows that KWin draws a titlebar for, this works automatically as long as the window is maximized or tiled. It won’t work if the window is free-floating and you manually resized it so that it’s touching a screen corner. It also won’t work if yo manually turned on the “draw border on maximized and tiled windows” in the Breeze decoration theme’s settings.
With windows that KWin doesn’t draw a titlebar for (e.g. GNOME CSD app windows), it’s up to the app/toolkit. As @medin mentioned, there’s a longstanding bug in GTK that prevents this from working. And as @jinliu mentioned, there’s not much incentive for GNOME folks to fix it since they can’t reproduce the issue in GNOME which has a top bar that breaks Fitts’ Law for titlebar buttons anyway.