Bug 465358 - After exit fullscreen window doesn't return to monitor where it was before
Summary: After exit fullscreen window doesn't return to monitor where it was before
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.26.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-06 05:28 UTC by gudvinr+kde
Modified: 2023-02-06 14:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.27
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gudvinr+kde 2023-02-06 05:28:43 UTC
SUMMARY

If window goes to fullscreen on another screen (wl_output is not null when xdg_toplevel::set_fullscreen called), when it exit fullscreen, it opens somewhere on said screen instead of going to the place where it was before.

I can easily reproduce it with MPV, for example.

STEPS TO REPRODUCE
1. Have 2 screens
2. launch MPV on second screen while using --fs-screen=1
3. Toggle fullscreen 2 times

OBSERVED RESULT
MPV window stays on 1st screen at seemingly arbitrary position

EXPECTED RESULT
MPV window moved to second screen at its old position.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.9-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX Vega M GL Graphics
Comment 1 Bug Janitor Service 2023-02-06 10:04:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3546
Comment 2 Vlad Zahorodnii 2023-02-06 11:54:37 UTC
Git commit 9807c83929692707fdbae23592c1b4db1a57ac5f by Vlad Zahorodnii.
Committed on 06/02/2023 at 11:33.
Pushed by vladz into branch 'master'.

{x11,wayland}: Fix restoring fullscreen windows

If the window has been originally on another output, make sure that the
window will be properly put back on it.

This logic seem to originate from 7d673802050ebeb55572b0275416eb87a7c251bc,
but it's not necessary anymore because geometry restore will be updated
if the window is moved to another output by the user.

M  +0    -4    src/x11window.cpp
M  +0    -4    src/xdgshellwindow.cpp

https://invent.kde.org/plasma/kwin/commit/9807c83929692707fdbae23592c1b4db1a57ac5f
Comment 3 Vlad Zahorodnii 2023-02-06 11:55:52 UTC
Git commit 6a8f58c0051131a14b905b7b5e32bf5cb21f0ea3 by Vlad Zahorodnii.
Committed on 06/02/2023 at 11:55.
Pushed by vladz into branch 'cherry-pick-9807c839'.

{x11,wayland}: Fix restoring fullscreen windows

If the window has been originally on another output, make sure that the
window will be properly put back on it.

This logic seem to originate from 7d673802050ebeb55572b0275416eb87a7c251bc,
but it's not necessary anymore because geometry restore will be updated
if the window is moved to another output by the user.


(cherry picked from commit 9807c83929692707fdbae23592c1b4db1a57ac5f)

M  +0    -4    src/x11window.cpp
M  +0    -4    src/xdgshellwindow.cpp

https://invent.kde.org/plasma/kwin/commit/6a8f58c0051131a14b905b7b5e32bf5cb21f0ea3