Bug 460628 (gtk-maximizing-broken) - window rule to maximize windows doesn't take effect after recent updates (Wayland & X11) for gtk2/3 applications
Summary: window rule to maximize windows doesn't take effect after recent updates (Way...
Status: CONFIRMED
Alias: gtk-maximizing-broken
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.26.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-10-17 21:52 UTC by Leopold Johannes Meinel
Modified: 2023-09-30 23:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
leo: Wayland+
leo: X11+


Attachments
window rule (GUI) (143.48 KB, image/png)
2022-10-17 22:00 UTC, Leopold Johannes Meinel
Details
no titlebar (445.02 KB, image/png)
2022-10-19 10:32 UTC, Leopold Johannes Meinel
Details
titlebar (431.95 KB, image/png)
2022-10-19 10:32 UTC, Leopold Johannes Meinel
Details
gtk2 (2.06 MB, image/png)
2022-10-19 10:45 UTC, Leopold Johannes Meinel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leopold Johannes Meinel 2022-10-17 21:52:07 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Set up these window rules: https://raw.githubusercontent.com/LeoMeinel/dot-files/main/.config/kwinrulesrc
2. Open a window (waterfox-g-bin, librewolf-bin, vscodium-bin - AUR packages maybe using similar Frameworks, should also be the case for codium from the repos however)

OBSERVED RESULT
See them not maximizing horizontally or vertically

EXPECTED RESULT
All windows are expected to maximize horizontally and vertically as they did 1/2 versions prior to this one 2.25.90 probably.

SOFTWARE/OS VERSIONS
Linux: Arch Linux; 6.0.2-zen1-1-zen (64-bit); Wayland
(available in About System)
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
The same behaviour can be observed under X11.
I also opened a bug on my own Github and may supply some updates there over time: https://github.com/LeoMeinel/arch-install/issues/69
Comment 1 Leopold Johannes Meinel 2022-10-17 22:00:19 UTC
Created attachment 152971 [details]
window rule (GUI)

This is a visual display of the window rule
Comment 2 Leopold Johannes Meinel 2022-10-17 22:14:20 UTC
(In reply to Leopold Johannes Meinel from comment #0)
> SUMMARY
> ***
> NOTE: If you are reporting a crash, please try to attach a backtrace with
> debug symbols.
> See
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports
> ***
> 
> 
> STEPS TO REPRODUCE
> 1. Set up these window rules:
> https://raw.githubusercontent.com/LeoMeinel/dot-files/main/.config/
> kwinrulesrc
> 2. Open a window (waterfox-g-bin, librewolf-bin, vscodium-bin - AUR packages
> maybe using similar Frameworks, should also be the case for codium from the
> repos however)
> 
> OBSERVED RESULT
> See them not maximizing horizontally or vertically
> 
> EXPECTED RESULT
> All windows are expected to maximize horizontally and vertically as they did
> 1/2 versions prior to this one 2.25.90 probably.
> 
> SOFTWARE/OS VERSIONS
> Linux: Arch Linux; 6.0.2-zen1-1-zen (64-bit); Wayland
> (available in About System)
> KDE Plasma Version: 5.26.0
> KDE Frameworks Version: 5.99.0
> Qt Version: 5.15.6
> 
> ADDITIONAL INFORMATION
> The same behaviour can be observed under X11.
> I also opened a bug on my own Github and may supply some updates there over
> time: https://github.com/LeoMeinel/arch-install/issues/69

Not codium from the repos but code: https://archlinux.org/packages/community/x86_64/code/
This is only an assumption but it's more or less the same application as vscodium-bin from AUR
Comment 3 Leopold Johannes Meinel 2022-10-18 21:45:08 UTC
This also applies to signal-desktop from the repos: https://archlinux.org/packages/community/x86_64/signal-desktop/
Comment 4 Leopold Johannes Meinel 2022-10-18 21:48:29 UTC
Since all applications this applies to have gtk as a dependency, I'll specify that in the title. Haven't noticed any qt apps behaving similarly yet.
Comment 5 Leopold Johannes Meinel 2022-10-18 21:52:29 UTC
snapper-gui-git (also a gtk app) works fine. https://aur.archlinux.org/packages/snapper-gui-git
Comment 6 Ismael Asensio 2022-10-18 22:03:37 UTC
Have you also tried to set a different rule property for those applications?

This can help sorting out if the issue is about windows not getting matched by the rule or are the specific "maximized" properties not being applied after matching.

I see that  the property "no border" is also in the rule. Is the effect the same if you do not set this property?

Thanks!
Comment 7 Leopold Johannes Meinel 2022-10-18 23:13:28 UTC
(In reply to Ismael Asensio from comment #6)
> Have you also tried to set a different rule property for those applications?
> 
> This can help sorting out if the issue is about windows not getting matched
> by the rule or are the specific "maximized" properties not being applied
> after matching.
> 
> I see that  the property "no border" is also in the rule. Is the effect the
> same if you do not set this property?
> 
> Thanks!

The no border rule is applied properly. Therefore I am pretty sure that vertical and horizontal maximizing rules are not being applied after matching for those applications.
I'll give an answer to the second question tomorrow.

Thanks for your quick answer!
Comment 8 Fushan Wen 2022-10-19 01:05:17 UTC
Can you test if GTK4 applications have the same bug?
Comment 9 Leopold Johannes Meinel 2022-10-19 10:31:33 UTC
(In reply to Ismael Asensio from comment #6)
> Have you also tried to set a different rule property for those applications?
> 
> This can help sorting out if the issue is about windows not getting matched
> by the rule or are the specific "maximized" properties not being applied
> after matching.
> 
> I see that  the property "no border" is also in the rule. Is the effect the
> same if you do not set this property?
> 
> Thanks!

Coming to the second question.
Without the no border rule, the same bug is happening.
I'll add 2 screenshots that show the bug for signal-dektop with and without title bar. Also applies to pop-up windows (which is also shown).
Comment 10 Leopold Johannes Meinel 2022-10-19 10:32:33 UTC
Created attachment 153024 [details]
no titlebar

This is the bug with the no titlebar applied
Comment 11 Leopold Johannes Meinel 2022-10-19 10:32:59 UTC
Created attachment 153025 [details]
titlebar

This is the bug without the no titlebar applied
Comment 12 Leopold Johannes Meinel 2022-10-19 10:40:08 UTC
(In reply to Leopold Johannes Meinel from comment #11)
> Created attachment 153025 [details]
> titlebar
> 
> This is the bug without the no titlebar applied

I tested with helvum, gtk4-demos, baobab and celluloid. With none of those the bug occurs. Therefore I'd assume that this doesn't apply to gtk4!
Comment 13 Leopold Johannes Meinel 2022-10-19 10:45:20 UTC
Created attachment 153026 [details]
gtk2

asunder and epdfview (gtk2 applications) having the same bug.
Comment 14 Leopold Johannes Meinel 2022-10-19 10:45:58 UTC
(In reply to Fushan Wen from comment #8)
> Can you test if GTK4 applications have the same bug?

GTK4 applications don't!
Only GTK2 and GTK3 applications have it. At least as far as I have tested.
Comment 15 Leopold Johannes Meinel 2022-10-19 10:51:08 UTC
Comment on attachment 153024 [details]
no titlebar

gtk3
Comment 16 Leopold Johannes Meinel 2022-10-19 10:55:49 UTC
(In reply to Fushan Wen from comment #8)
> Can you test if GTK4 applications have the same bug?

Sorry, I messed up a reply and also added one unnecessary comment by mistake (not sure if there's a way to edit/delete), to correct this:
I tested with helvum, gtk4-demos, baobab and celluloid. With none of those the bug occurs. Therefore I'd assume that this doesn't apply to gtk4!
Comment 17 Vlad Zahorodnii 2022-10-21 07:47:18 UTC
If a window rule makes the window both maximized vertically and horizontally, does it work as expected?
Comment 18 Leopold Johannes Meinel 2022-10-21 08:56:40 UTC
(In reply to Vlad Zahorodnii from comment #17)
> If a window rule makes the window both maximized vertically and
> horizontally, does it work as expected?

The window rule is doing exactly that, or do you mean something else?

Window rule:
https://raw.githubusercontent.com/LeoMeinel/dot-files/main/.config/kwinrulesrc
Comment 19 Holger 2023-09-30 23:05:44 UTC
I'd like to maximize Firefox and remove the decorations. This is Kubuntu with the SNAP-Version of FF. My Window rules are:
https://bugs.kde.org/attachment.cgi?id=159042 (bug 469908)

a) The no decoration part of the rule works reliably.
b) The maximization is not enforced (FF restoring session of 6 windows, 4 get maximized and two are random non-maximized)
c) The according option in Alt+F3 Window-Menu is disabled.
d) By super+right drag I can adjust the size (direct user interaction taking precedence appreciated).
e) Also my FF-Windows are distributed to different virtual desktops. But some don't make it - usually the least recently opened window does not go to it's respective VD, but opens in the current VD instead (independent of which FF window / VD was use to exit FF).

Versions:
Firefox: 118.0
gtk-3-themes
OS-Theme 	Nord-GTK / Adwaita

Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-33-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4700MQ CPU @ 2.40GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Manufacturer: Micro-Star International Co., Ltd.
Product Name: GE70 2OC\2OD\2OE
System Version: REV:1.0