Bug 481707 - middle of screen set offset
Summary: middle of screen set offset
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-23 04:51 UTC by David Chmelik
Modified: 2024-02-23 09:41 UTC (History)
1 user (show)

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


Attachments
1 (1.80 MB, image/jpeg)
2024-02-23 04:55 UTC, David Chmelik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Chmelik 2024-02-23 04:51:49 UTC
SUMMARY
The middle of screen is set offset, so windows don't snap halfway rather than wrong position.

STEPS TO REPRODUCE
1. Start KDE.
2. Find 'middle' of screen.

OBSERVED RESULT
The middle of screen is set offset, so windows don't snap halfway rather than wrong position.

EXPECTED RESULT
Set middle of screen at middle.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon GNU/Linux 5.27 22.04
KDE Plasma Version: 5.27
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Comment 1 David Chmelik 2024-02-23 04:53:02 UTC
Top screen is 1600x1200.  Left-side screen is 4K.  Right-side screen is 1080p.
Comment 2 David Chmelik 2024-02-23 04:55:07 UTC
Created attachment 166030 [details]
1

screenshot (didn't originally fit) with KRuler showing wrong middle
Comment 3 fanzhuyifan 2024-02-23 05:39:38 UTC
How are you finding the middle of the screen? Is this an issue with quick tiling?
Comment 4 David Chmelik 2024-02-23 05:41:36 UTC
(In reply to fanzhuyifan from comment #3)
> How are you finding the middle of the screen? Is this an issue with quick
> tiling?

Already stated/shown (image): snapping, KRuler (I don't know what quick tiling is).
Comment 5 fanzhuyifan 2024-02-23 05:55:07 UTC
(In reply to David Chmelik from comment #4)
> (In reply to fanzhuyifan from comment #3)
> > How are you finding the middle of the screen? Is this an issue with quick
> > tiling?
> 
> Already stated/shown (image): snapping, KRuler (I don't know what quick
> tiling is).

By snapping, do you mean that you drag the window to the vertical screen edge and then the window maximizes to fill half of the screen?
Comment 6 fanzhuyifan 2024-02-23 05:56:26 UTC
And is this on X11 or wayland?
Comment 7 fanzhuyifan 2024-02-23 06:05:26 UTC
So I stared at the image some more, and the left edge of is -1080, and the right edge is 2760. So the middle should be 840, while in the picture it is around 854, 14px of difference. Could you also provide the output of kscreen-doctor -o? Thanks!
Comment 8 fanzhuyifan 2024-02-23 06:06:27 UTC
(In reply to fanzhuyifan from comment #7)
> So I stared at the image some more, and the left edge of is -1080, and the
> right edge is 2760. So the middle should be 840, while in the picture it is
> around 854, 14px of difference. Could you also provide the output of
> kscreen-doctor -o? Thanks!

834, not 854, so 6px of difference
Comment 9 David Chmelik 2024-02-23 06:07:42 UTC
Actually, middle should be 1920 (it's mistakenly offset so programs try to snap to what looks like (but isn't exact) about 1/16 & 15/16 the screen).

d@cosmos:~$ kscreen-doctor -o
Output: 84 DisplayPort-0 enabled connected priority 1 DisplayPort Modes: 89:3840x2160@60*! 90:3840x2160@60 91:3840x2160@50 92:3840x2160@48 93:3840x2160@30 94:2560x1600@60 95:2560x1440@60 96:1920x1200@60 97:1920x1080@60 98:1920x1080@60 99:1920x1080@60 100:1600x1200@60 101:1680x1050@60 102:1280x1024@60 103:1440x900@60 104:1280x960@60 105:1280x800@60 106:1280x720@60 107:1280x720@60 108:1024x768@60 109:1440x480@60 110:1440x480@60 111:832x624@75 112:800x600@60 113:720x480@60 114:720x480@60 115:640x480@60 116:640x480@60 117:720x400@70 118:640x350@70 Geometry: 0,1200 3840x2160 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 85 DisplayPort-1 enabled connected priority 2 DisplayPort Modes: 98:1920x1080@60*! 102:1280x1024@60 108:1024x768@60 112:800x600@60 116:640x480@60 1913:1680x1050@60 1914:1440x900@60 1915:1366x768@60 1916:1280x800@60 1917:1280x720@60 Geometry: 3840,1200 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 86 DisplayPort-2 enabled connected priority 3 DisplayPort Modes: 102:1280x1024@60 104:1280x960@60 108:1024x768@60 111:832x624@75 112:800x600@60 116:640x480@60 117:720x400@70 1895:1600x1200@60*! 1896:1280x1024@75 1897:1440x900@60 1898:1280x800@60 1899:1152x864@75 1900:1280x720@60 1901:1024x768@75 1902:1024x768@70 1903:800x600@72 1904:800x600@75 1905:800x600@56 1906:640x480@75 1907:640x480@73 1908:640x480@67 Geometry: 1183,0 1600x1200 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 87 HDMI-A-0 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 155 DisplayPort-1-3 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 156 DisplayPort-1-4 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 157 DisplayPort-1-5 disabled disconnected priority 0 DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 158 HDMI-A-1-1 disabled disconnected priority 0 HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 10 fanzhuyifan 2024-02-23 06:13:14 UTC
Looking at the output, there is no fractional scaling. Could you elaborate on what you mean by snapping? Or maybe upload a screencast if that is easier? I still don't quite follow, and on my end quick tiling to the edges correctly fill up half of the screen.
Comment 11 David Chmelik 2024-02-23 07:10:05 UTC
(In reply to fanzhuyifan from comment #10)
> Looking at the output, there is no fractional scaling. Could you elaborate
> on what you mean by snapping? Or maybe upload a screencast if that is
> easier? I still don't quite follow, and on my end quick tiling to the edges
> correctly fill up half of the screen.

You already described snapping and I can't elaborate on that.
My 4K screen is 3840px wide.  3840/2=1920, so the middle should be at 1920 and snap to there.  If you see my KRuler, it didn't put the middle there rather than at 1080px.  You'd think then it'd snap to 1080px but it actually snaps to 1080/2 (540) on that side and 3840-540 on the other side.  The screenshot already shows the middle has been miscalculated, and it'd take much effort/time to make a 'screencast' to show snapping is similarly wrong but even if I did that, you wouldn't see anything significantly different than you already see with KRuler.
Comment 12 David Chmelik 2024-02-23 07:15:35 UTC
I can maybe do it but will have to find/install/learn a desktop video-making program.
Comment 13 David Chmelik 2024-02-23 09:02:37 UTC
On the OS I'm temporarily using (I now of course switched to XFCE) the windows now snap to real centre (in KDE) but KRUler's centre is still offset to be at the end of 1080 pixels instead of half of 4K... so this is now only a KRuler program.  As I show the case with KRuler, you won't need a video... but I guess it should be moved to be a KRuler but or opened as one?  Unsure what to do about that or how.
Comment 14 David Chmelik 2024-02-23 09:41:00 UTC
Didn´t start as a KRuler bug so I'll mark this resolved