When you maximize or right-tile a GTK3 CSD headerbar app, the top-right-most pixel in the screen doesn'r trigger the button on the far right position on the headerbar--usually the close button. It does do this for apps using the Breeze QWidgets theme, but this does not work for CSD-using GTK3 apps using the Breeze-GTK theme
*** Bug 421937 has been marked as a duplicate of this bug. ***
*** Bug 430632 has been marked as a duplicate of this bug. ***
*** Bug 434734 has been marked as a duplicate of this bug. ***
*** Bug 434897 has been marked as a duplicate of this bug. ***
Created attachment 137696 [details] bug It seems that there are some margins preventing the buttons to fully expand.
I forgot to mention: I opened Spectacle and Firefox to show this bug while I'm using Qogir window decoration theme.
Also, this still happens in KDE 5.21.4
Created attachment 138012 [details] margin This still happens in KDE 5.21.4. It seems that there's a margin in the window buttons panel. If Qogir theme (square version) is applied, this problem gets more noticeable.
After reading Nate's blog post about the 15-Minute Bug Initiative (https://pointieststick.com/2022/01/18/the-15-minute-bug-initiative/), I believe this bug is a nice candidate for the list. GTK apps are a big part of the Linux desktop and this issue can be seen pretty quickly by any user who switches to using Plasma from other GTK DEs and want to keep using the programs they were used to. This also has 4 duplicates, so it's something that has been affecting a considerable amount of people.
Fair enough!
*** Bug 450946 has been marked as a duplicate of this bug. ***
Unfortunately this is an upstream bug in GTK itself that we can't work around in the Breeze GTK theme. See https://gitlab.gnome.org/GNOME/gtk/-/issues/583
*** Bug 467021 has been marked as a duplicate of this bug. ***
In progress with https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/71 since it turns out we *can* work around it in breeze-gtk and the GTK folks don't seem interested in fixing it generically.
Git commit 0f887127b929ac2d50b22af1bb97fc25411b40aa by Fushan Wen. Committed on 29/03/2023 at 16:52. Pushed by fusionfuture into branch 'master'. gtk4/windowcontrols: extend control area to window borders This makes GTK4 window control buttons follow Fitts' law. M +42 -152 src/gtk4/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/0f887127b929ac2d50b22af1bb97fc25411b40aa
Git commit d11333a830a4fdf6482c176e9a036e236bc80134 by Fushan Wen. Committed on 29/03/2023 at 16:52. Pushed by fusionfuture into branch 'master'. gtk3/titlebutton: extend control area to window borders M +21 -9 src/gtk3/widgets/_window_decorations.scss M +7 -3 src/gtk4/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/d11333a830a4fdf6482c176e9a036e236bc80134
Git commit 59448164f7df462ae4a2c1119f6be59146d60399 by Fushan Wen. Committed on 29/03/2023 at 16:56. Pushed by fusionfuture into branch 'Plasma/5.27'. gtk3/titlebutton: extend control area to window borders (cherry picked from commit d11333a830a4fdf6482c176e9a036e236bc80134) M +21 -9 src/gtk3/widgets/_window_decorations.scss M +7 -3 src/gtk4/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/59448164f7df462ae4a2c1119f6be59146d60399
Git commit 83f4f7c184954eb89aaea52684f1ce076873e8c3 by Fushan Wen. Committed on 29/03/2023 at 16:56. Pushed by fusionfuture into branch 'Plasma/5.27'. gtk4/windowcontrols: extend control area to window borders This makes GTK4 window control buttons follow Fitts' law. (cherry picked from commit 0f887127b929ac2d50b22af1bb97fc25411b40aa) M +42 -152 src/gtk4/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/83f4f7c184954eb89aaea52684f1ce076873e8c3
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/83
Git commit cbab51eebfe21827830ada2ee4b339c43371ca86 by Fushan Wen. Committed on 10/05/2023 at 04:28. Pushed by fusionfuture into branch 'master'. gtk3: revert button padding hack When Firefox draws its window controls, margins and paddings are also considered, so we can't use button padding hack to expand the control areas of window controls. M +0 -35 src/gtk3/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/cbab51eebfe21827830ada2ee4b339c43371ca86
Git commit 2f2923c2a5ce8b656e2f531bb0791c1ec105873a by Fushan Wen. Committed on 22/05/2023 at 14:39. Pushed by fusionfuture into branch 'Plasma/5.27'. gtk3: revert button padding hack When Firefox draws its window controls, margins and paddings are also considered, so we can't use button padding hack to expand the control areas of window controls. (cherry picked from commit cbab51eebfe21827830ada2ee4b339c43371ca86) M +0 -35 src/gtk3/widgets/_window_decorations.scss https://invent.kde.org/plasma/breeze-gtk/commit/2f2923c2a5ce8b656e2f531bb0791c1ec105873a
(In reply to Fushan Wen from comment #21) > When Firefox draws its window controls, margins and paddings are > also considered, so we can't use button padding hack to expand the > control areas of window controls. FWIW if Firefox was the only app affected I'd be happy to help making it work. Negative margins aren't considered [here](https://searchfox.org/mozilla-central/rev/f4d3fe187cf7dffa4c13b354bbde9bc47b5ccd3f/widget/gtk/gtk3drawing.cpp#285-297), so probably it's a matter of tweaking that code appropriately.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #22) > (In reply to Fushan Wen from comment #21) > Negative margins aren't considered > [here](https://searchfox.org/mozilla-central/rev/ > f4d3fe187cf7dffa4c13b354bbde9bc47b5ccd3f/widget/gtk/gtk3drawing.cpp#285-297), > so probably it's a matter of tweaking that code appropriately. I was wrong and margins are accounted for elsewhere (see `buttonMargin` in that file), so it needs some more debugging, but I'd be happy to help either way.