Bug 443756 - Maximized Gnome apps don't fully repaint
Summary: Maximized Gnome apps don't fully repaint
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.23.0
Platform: Archlinux Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-15 03:00 UTC by Jin Liu
Modified: 2021-10-15 14:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.23.1
vlad.zahorodnii: Wayland-
vlad.zahorodnii: X11+


Attachments
Maximize by clicking button (608.71 KB, image/png)
2021-10-15 03:00 UTC, Jin Liu
Details
Maximize by dragging to the screen top (136.36 KB, image/png)
2021-10-15 03:00 UTC, Jin Liu
Details
Hover over the (invisible) close button. (140.05 KB, image/png)
2021-10-15 06:23 UTC, Jin Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2021-10-15 03:00:10 UTC
Created attachment 142454 [details]
Maximize by clicking button

SUMMARY
When clicking the maximize button of a client-side decoration app (e.g. Gnome Seahorse, Firefox), it doesn't repaint the right and bottom edge.
However, maximizing by draging the window to the top screen border works fine.

STEPS TO REPRODUCE
1. Open Gnome Seahorse in unmaximized state.
2. Click the maximize button.

OBSERVED RESULT
The window is missing right and bottom edge. Shows the wallpaper under. (as in attachment 1 [details]) 

EXPECTED RESULT
The window is maximized. (as in attachment 2 [details])

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23
KDE Frameworks Version: 5.87
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Jin Liu 2021-10-15 03:00:41 UTC
Created attachment 142455 [details]
Maximize by dragging to the screen top
Comment 2 Vlad Zahorodnii 2021-10-15 06:13:53 UTC
Works fine on my machine. It looks like the close button is clipped. If you click where the close button is expected to be, does seahorse close? i.e. do clipped parts of the window receive input?

Also, do you use any scripts or window rules?
Comment 3 Vlad Zahorodnii 2021-10-15 06:16:14 UTC
Can you also run seahorse with WAYLAND_DEBUG=1 and post the output here? If possible please keep your interactions with seahorse at minimum so it's easier to analyze the logs, i.e. start seahorse, click the maximize button and close seahorse.

  env WAYLAND_DEBUG=1 seahorse
Comment 4 Jin Liu 2021-10-15 06:23:49 UTC
Created attachment 142458 [details]
Hover over the (invisible) close button.
Comment 5 Jin Liu 2021-10-15 06:32:55 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Works fine on my machine. It looks like the close button is clipped. If you
> click where the close button is expected to be, does seahorse close? i.e. do
> clipped parts of the window receive input?

Yes, the close button works. And it repaints as expected when hovered (see attachment 142458 [details]).
Also as your can see in the screenshot, near the close button, there is a small "x". Looks like leftover of the maximize animation.

> Also, do you use any scripts or window rules?

I was using "dynamic workspaces" and "sticky window snapping". But it's the same when I disabled these scripts.

> Can you also run seahorse with WAYLAND_DEBUG=1 and post the output here? If possible please keep your interactions with seahorse at minimum so it's easier to > analyze the logs, i.e. start seahorse, click the maximize button and close seahorse.
>  env WAYLAND_DEBUG=1 seahorse

I'm using X11. "env WAYLAND_DEBUG=1 seahorse" doesn't give any output. I'll try in wayland session.
Comment 6 Vlad Zahorodnii 2021-10-15 06:35:36 UTC
Can reproduce on X11.
Comment 7 Jin Liu 2021-10-15 06:48:23 UTC
Can't reproduce in Wayland. Seems an X11-only problem.
In wayland, Seahorse has no minimize/maximize button as in X11. I tried double-clicking the titlebar, and dragging to top. Both work fine.
Comment 8 Bug Janitor Service 2021-10-15 07:32:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1531
Comment 9 Vlad Zahorodnii 2021-10-15 07:57:50 UTC
Git commit 59a4a908f995fd5cd50bae60e64c5ef4ce3d9fe2 by Vlad Zahorodnii.
Committed on 15/10/2021 at 07:30.
Pushed by vladz into branch 'master'.

Properly update parent item's bounding rect when moving item

The bounding rect of an item is in the item-local coordinate space. If
the item is moved, its bounding rect won't change, but the parent's
bounding rect, may change.

M  +3    -1    src/item.cpp

https://invent.kde.org/plasma/kwin/commit/59a4a908f995fd5cd50bae60e64c5ef4ce3d9fe2
Comment 10 Vlad Zahorodnii 2021-10-15 07:58:23 UTC
Git commit 5df7f620c5ac03fb772e700c8138fb0f59e13093 by Vlad Zahorodnii.
Committed on 15/10/2021 at 07:58.
Pushed by vladz into branch 'Plasma/5.23'.

Properly update parent item's bounding rect when moving item

The bounding rect of an item is in the item-local coordinate space. If
the item is moved, its bounding rect won't change, but the parent's
bounding rect, may change.


(cherry picked from commit 59a4a908f995fd5cd50bae60e64c5ef4ce3d9fe2)

M  +3    -1    src/item.cpp

https://invent.kde.org/plasma/kwin/commit/5df7f620c5ac03fb772e700c8138fb0f59e13093