Bug 461840

Summary: When opening a file, window resizes and re-positions itself after launch, which looks bad on Wayland because re-positioning isn't supported
Product: [Applications] dragonplayer Reporter: Nate Graham <nate>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: myriam, sitter
Priority: NOR Keywords: wayland
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 23.04
Sentry Crash Report:
Attachments: Screen recording

Description Nate Graham 2022-11-14 20:50:07 UTC
Created attachment 153748 [details]
Screen recording

See attached screen recording on Wayland.

When opening a file in DragonPlayer, its main window briefly appears according to the configured window placement mode, and then it loads the file. When it does this, its window may become larger to accommodate it, if it's a video file.

On X11 the window also re-positions itself to preserve the appearance of growing in all dimensions, which presents no problems other than a brief flicker on launch.

But on Wayland, windows can only resize themselves and not re-position themselves, so the window grows from its top-left corner. This causes the window to be positioned oddly, and its bottom and right edges can get cut off.

It would be ideal if the window opened at the correct size immediately so that KWin's window positioning code can position it properly, rather than opening at one size and then resizing and re-positioning itself later.
Comment 1 Bug Janitor Service 2022-11-20 23:24:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/dragon/-/merge_requests/13
Comment 2 Nate Graham 2022-11-22 15:40:11 UTC
Git commit 922b52be7f0b1609ec07dbe4ff218c3458279ca3 by Nate Graham, on behalf of Harald Sitter.
Committed on 22/11/2022 at 15:37.
Pushed by ngraham into branch 'master'.

don't resize window to video

it looks weird, it jumps around weird, it doesn't work properly on
wayland

M  +0    -2    src/app/stateChange.cpp
M  +0    -10   src/app/videoWindow.cpp
M  +0    -1    src/app/videoWindow.h

https://invent.kde.org/multimedia/dragon/commit/922b52be7f0b1609ec07dbe4ff218c3458279ca3