Bug 414522

Summary: On X11 with a scale factor, maximized (but not quick-tiled) windows are 1 pixel too narrow and/or short
Product: [Plasma] kwin Reporter: Méven Car <meven29>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: 09_strays_flinty, 1900011604, agurenko, nate, sunspark
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=472832
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Bottom right concerned dolphin and plasmashell

Description Méven Car 2019-11-26 09:38:56 UTC
Created attachment 124123 [details]
Bottom right concerned dolphin and plasmashell

SUMMARY

When you maximize a window (either with shortcut or snap-top or button(s) maximized), a vertical line can be seen on the right edge of the window that corresponds to whatever is drawn behind this window or just before. Very often it is the wallpaper.

It does not concern "snap-right" windows, windows positioned so that they span the right half of the screen.

It seems to concern only KDE/Qt apps (vlc, kate, dolphin qt-creator) but not GTK (firefox is not concerned).

Plasmashell is affected too.

It is x11 only AFAIK.

I am not sure if it is KWin, decoration or even Qt that is concerned.
I have been digging into the code and adding debug message to try diagnose it without success.

It may be due to my hardware and settings :

Screen resolution : 3840*2160
Scale factor: 2
graphic driver: i915

STEPS TO REPRODUCE
1. In x11, maximize a Qt/KDE App

OBSERVED RESULT
A vertical line is drawn that is not part of the application (see attachement).

EXPECTED RESULT
No vertical line artifact on Qt maximized windows.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.65.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-23-generic
Comment 1 Vlad Zahorodnii 2019-12-09 09:45:58 UTC
Can you post xprop output of the maximized window and the panel?

> KDE Plasma Version: 5.17.80
Can you reproduce this issue in 5.17.{0,1,2,3,4}?
Comment 2 Méven Car 2019-12-10 10:33:08 UTC
Panel (affected) xprop:

10:41 $ xprop
_KDE_WINDOW_HIGHLIGHT(_KDE_WINDOW_HIGHLIGHT) = 0x6600004, 0x400023, 0x400031
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 90
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 3835
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
_NET_WM_USER_TIME(CARDINAL) = 249801862
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x0, 0x0, 0xefb, 0x1, 0x0, 0x1, 0xefd, 0x58, 0x3dfe2535, 0xbc430fb5, 0xbc430fb5, 0x0, 0xbd240cba, 0x3dc480cf, 0xbd240cba, 0x0, 0xbb847cd3, 0xbb847cd3, 0x3e071faf, 0x0, 0x3e23d70b, 0x3e23d70b, 0x3e23d70b, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 0, 0, 3835, 1, 0, 1, 3837, 88
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.plasmashell"
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Plasma"
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 81713613
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x400011
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                window id # of group leader: 0x400011
WM_CLIENT_MACHINE(STRING) = "meven-XPS-13-9370"
_NET_WM_PID(CARDINAL) = 13409
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 4194351
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 2070
                user specified size: 3839 by 90
                program specified minimum size: 3839 by 90
                program specified maximum size: 3839 by 90
                program specified resize increment: 2 by 2
                program specified base size: -2 by -2
                window gravity: Static

The width of the size hints "specified size: 3839 by 90" seems to miss 1 px.


Maximixed Gwenview window (affected)

10:43 $ xprop
_NET_WM_USER_TIME(CARDINAL) = 249753526
_NET_WM_ICON_GEOMETRY(CARDINAL) = 1408, 1175, 339, 23
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 0, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
_KDE_NET_WM_ACTIVITIES(STRING) = "428fa590-1920-4b3c-a7e1-1842e6164707"
WM_WINDOW_ROLE(STRING) = "MainWindow#1"
_NET_WM_ICON_NAME(UTF8_STRING) = 
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.gwenview"
_NET_WM_ICON(CARDINAL) =        Icon (29 x 29): <trunkated for clarity>
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Gwenview"
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 249711908
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x9400008
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x9400008
WM_CLIENT_MACHINE(STRING) = "meven-XPS-13-9370"
_NET_WM_PID(CARDINAL) = 9001
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 155189255
WM_CLASS(STRING) = "gwenview", "gwenview"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified size: 2264 by 1678
                program specified minimum size: 544 by 389
                program specified resize increment: 2 by 2
                program specified base size: 0 by 0
                window gravity: Static

> Can you reproduce this issue in 5.17.{0,1,2,3,4}?

No sure, but given I build and test from source, I would guess so.
Comment 3 Vlad Zahorodnii 2019-12-13 16:02:53 UTC
Urgh, I had meant "xwininfo output", sorry.
Comment 4 Méven Car 2019-12-16 21:04:52 UTC
xwininfo

Plasmashell: 

xwininfo: Window id: 0x2800022 "Plasma"

  Absolute upper-left X:  0
  Absolute upper-left Y:  2068
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 3840
  Height: 92
  Depth: 32
  Visual: 0xcf
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x2800021 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+2068  -0+2068  -0-0  +0-0
  -geometry 3840x92+0-0


Dolphin maximised:

xwininfo: Window id: 0x3800006 "meven — Dolphin"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 3840
  Height: 2068
  Depth: 24
  Visual: 0x151
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x3800005 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-92  +0-92
  -geometry 1920x1034+0+0
Comment 5 Méven Car 2020-01-25 14:02:49 UTC
Is there something more I can do?
Comment 6 Nate Graham 2023-06-13 21:14:14 UTC
Can confirm, even in Plasma 6.
Comment 7 Nate Graham 2023-06-13 21:14:24 UTC
*** Bug 470185 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2023-09-14 19:12:52 UTC
*** Bug 470895 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2023-09-15 17:13:13 UTC
*** Bug 470895 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2023-11-03 20:57:50 UTC
*** Bug 476442 has been marked as a duplicate of this bug. ***