Bug 363935

Summary: Vertical panel covers maximized windows with new Qt multiscreen support
Product: [Plasma] plasmashell Reporter: Daniel Lichtenberger <daniel.lichtenberger>
Component: generic-multiscreenAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mgraesslin, plasma-bugs-null
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.7.0
Sentry Crash Report:
Attachments: Screenshot showing the issue
Patch: use QScreen::virtualGeometry in PanelView::updateStruts

Description Daniel Lichtenberger 2016-06-04 11:13:28 UTC
I've been using the new Qt-based screen code from https://git.reviewboard.kde.org/r/125451/ for a few weeks now. So far no issues and less flickering, but now I noticed an issue with a vertical panel attached to the right screen edge: maximized windows slip below the panel, the panel's area is not excluded from the desktop size (see attached screenshot).

Reverting the QScreen change fixes the issue. I also have this problem with the current master version (0d0c4f4a).

Reproducible: Always

Steps to Reproduce:
1. Move the panel to the right screen edge
2. Maximize a window


Actual Results:  
The maximized window covers the whole screen, including the panel

Expected Results:  
The window should not cover the panel
Comment 1 Daniel Lichtenberger 2016-06-04 11:14:19 UTC
Created attachment 99364 [details]
Screenshot showing the issue
Comment 2 Daniel Lichtenberger 2016-06-05 08:09:27 UTC
The issue is related to my multiscreen setup. I moved the panel to the right border of my right screen, and the new code in PanelView::updateStruts fails to take that into account: "wholeScreen" loads the current screen geometry, not the whole (virtual) screen geometry, and "rightOffset" ends up being negative.

Against the advice in the comments, I changed the initiatlization of wholeScreen to screen()->virtualGeometry() - it seems to work for me, but I don't know about the reasons why virtualGeometry() was deemed unreliable.
Comment 3 Daniel Lichtenberger 2016-06-05 08:10:44 UTC
Created attachment 99378 [details]
Patch: use QScreen::virtualGeometry in PanelView::updateStruts
Comment 4 Martin Flöser 2016-07-11 11:33:35 UTC
Thanks for adding the patch! And sorry that we didn't notice earlier. In future please post the patch to phabricator.kde.org for Project Plasma. That way it lands in the inbox of the Plasma devs ;-)

In the mean time this problem was fixed with https://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=b866bbe75e04584f0a54980c2c21cba2eadc123b - a quite similar patch to yours