https://bugs.kde.org/show_bug.cgi?id=452118

--- Comment #29 from Gauthier <g.gue...@posteo.net> ---
(In reply to Gauthier from comment #24)
> I also have an issue along similar lines on Wayland (so also posted there
> bug 468184)
> 
> When unpluging my external screen from my laptop, many windows (e.g. firefox
> and gnucash) are not (or not appropriately) resized when moved to the laptop
> screen. Specifically they are too heigh with the title bar being out of the
> screen, meaning I cannot move/minmize/maximize/close them, I have to use the
> shortcut Ctrl + F5 to move them and then resize manually.
> 
> External screen is a 34" 3440x1440 whereas laptop screen is 14" 1920x1080
> (no scaling applied to either).
> 
> Operating System: KDE neon 5.27
> KDE Plasma Version: 5.27.4
> KDE Frameworks Version: 5.105.0
> Qt Version: 5.15.9
> Kernel Version: 6.1.22-060122-generic (64-bit)
> Graphics Platform: Wayland
> Processors: 8 × Intel® Core™ i5-8350U CPU @ 1.70GHz
> Memory: 15.3 GiB of RAM
> Graphics Processor: Mesa Intel® UHD Graphics 620
> 
> I have no idea how Kwin handles this currently (and so I don't want to tell
> dev how to do things) but just in case it's useful, it sounds like a
> systematic approach when it comes to window size and placement could be:
> 
> To define window size on any given screen:
> ====================================
> width ratio = (window width in px / screen width in px)
> height ratio = (window height in px/ screen height in px)
> >> those width/height ratios can then be applied to different size screens' 
> >> height / width in plug / unplug events which would conserve the same 
> >> relative window size across any screen (independently of absolute screen 
> >> size or aspect ration).
> 
> To define windows placement:
> =========================
> horizontal ratio: distance between screen left edge and window horizontal
> centre / distance between screen left edge and screen horizontal centre
> (i.e. half screen width)
> vertical ratio: distance between screen top edge and window vertical centre
> / distance between screen top edge and screen vertical centre (i.e. half
> screen height)
> >> Those ratio can then be applied to the window (horizontal / vertical) 
> >> centre in plug / unplug events so the relative placement is conserved 
> >> across any screens (independently of absolute screen size or aspect 
> >> ration).

The case that this does not cover is if a window is spread across several
screens. In this case (only) then the size / placement ratio should be worked
out taken the full width / height of all screens the window is spread across.
Then in plug / unplug events those ratio can be applied just fine to the new
screen config.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to