Bug 435674 - [X11] Maximized windows intermittently refuse to close from extreme top-right corner with HiDPI
Summary: [X11] Maximized windows intermittently refuse to close from extreme top-right...
Status: RESOLVED DUPLICATE of bug 391956
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.21.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-12 22:54 UTC by Paul McAuley
Modified: 2022-05-24 15:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul McAuley 2021-04-12 22:54:26 UTC
This is a rather annoying intermittent bug that has been plaguing me for years. I have my display scaling set to 2.5x and sometimes my maximized windows refuse to close when the pointer is in the extreme top-right of the screen.

In the video at http://www.paulmcauley.com/kde/bugs/client_width_maximize_bug.mp4 I have a terminal with output being shown from the following placed in the Breeze window decoration code:
qDebug() << "Client width:" << client().data()->width();

I was trying to debug whether this was being caused by the window decoration or the client, but it seems that under normal circumstances for my setup my client width when maximized is 3700px, and when the bug occurs the client width is 3699px or less. That would suggest that this is an issue caused by the client.

I can only speculate about what is causing such an intermittent bug -- integer arithmetic instead of floating point when scaled by a non-integer value of x2.5? rounding errors?


SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.3.18-lp152.69-default
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 630

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-04-14 00:59:16 UTC
Can you see a visible line of pixels showing through on the right or top screen edge? Or does the window look, for all intents and purposes, maximized? If you see a line of pixels, it may be a variant of Bug 428895.

Also, are we talking about SSD apps windows? Because GTK CSD apps windows are known to be affected by Bug 419089.

Another thing: can you go to System Settings > Appearance > Window Decorations > Breeze > Click on the inline pencil button and make sure that "Allow resizing maximized windows from window edged" is unchecked?

Finally, does this happen on Wayland as well? Or just X11?
Comment 2 Paul McAuley 2021-04-14 18:35:16 UTC
(In reply to Nate Graham from comment #1)
> Can you see a visible line of pixels showing through on the right or top
> screen edge? Or does the window look, for all intents and purposes,
> maximized? If you see a line of pixels, it may be a variant of Bug 428895.

I also experience bug 428895 (a pixel gap between the panel and the window -- you can see it in my video). However, I believe this is a separate issue as bug 428895 only happens for me when PLASMA_USE_QT_SCALING=1 is set. This bug happens intermittently regardless of the PLASMA_USE_QT_SCALING setting.


> Also, are we talking about SSD apps windows? Because GTK CSD apps windows
> are known to be affected by Bug 419089.

It occurs for all windows. For SSD apps windows it happens intermittently, for GTK CSD apps windows it happens always. (not sure if Bug 419089 is the correct one you meant to mention there, as it is closed)


> Another thing: can you go to System Settings > Appearance > Window
> Decorations > Breeze > Click on the inline pencil button and make sure that
> "Allow resizing maximized windows from window edged" is unchecked?

"Allow resizing maximized windows from window edged" is indeed unchecked.

> Finally, does this happen on Wayland as well? Or just X11?

My initial testing indicates that this only happens on X11. I will try out Wayland for longer and report back if I ever experience it on Wayland.
Comment 3 Nate Graham 2021-04-14 18:50:51 UTC
Thanks for the info!
Comment 4 Jin Liu 2021-06-23 14:18:31 UTC
Same problem for me.

My config:
3200x2000 screen
250% zoom
Window title font=Noto Sans 9pt
The bottom panel moved to the left edge
All other plasma settings at default.

Now when I resize the panel width to 84 or 88, and open a maximized window, clicking the top-right corner pixel has no effect.
Restore that window, then maximize again, no problem. The top-right corner pixel now works for that window.
If panel width is 80, 82 or 86, no problem.

Hope this helps. My gut feeling is some rounding problem here with 2.5x zoom and certain screen size...
Comment 5 Paul McAuley 2021-12-19 10:43:49 UTC
Another aspect of this bug is that sometimes clicking at the extreme top-right causes the window behind the one you want to close to close instead.
Comment 6 Jin Liu 2022-05-24 08:43:27 UTC
I guess this is related to  https://bugs.kde.org/show_bug.cgi?id=445741 
I.e. it's caused by StrictGeometry window hints on all KDE apps, which prevents a window to be fullscreen or maximized to cover the top-right pixel, in 2.5x zoom and a screen resolution not multiply of 3.
It can be worked around by creating a window rule matching all windows, and force "strict geometry" to disabled.
Comment 7 Nate Graham 2022-05-24 15:05:04 UTC

*** This bug has been marked as a duplicate of bug 391956 ***