Bug 368158

Summary: System Activity dialog always appears offscreen
Product: [Applications] ksysguard Reporter: Jason Tibbitts <j>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.7.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Other   
Latest Commit: Version Fixed In:

Description Jason Tibbitts 2016-09-02 14:38:49 UTC
I have a non-rectangular desktop.  It has three monitors arranged in a square with no monitor in the upper left hand corner.

When I open the "System Activity" dialog, either with Shift-Escape or by running "systemmonitor" from the command line, the dialog will always (and I really do mean 100% of the time) open in the place where I have no monitor.  I can click on the entry in the taskbar, navigate down to the Move option and drag the window onscreen to see it.

I tried setting up a kwin rule to ignore the initial placement for that window (and always put it under the mouse, or on the primary monitor, or something) but I can't seem to get that to work for whatever reason.

This isn't the only window that usually opens offscreen, of course.  Generally, though, it's just transient dialogs that do it.  While a kwin option to prevent things from opening offscreen would probably be a good idea, I figured I'd file file a ticket against each individual application I run across.  Absolute positioning is generally a bad idea unless you're just restoring the last position where the dialog was closed, but if you're going to do it, at least clamp to the active portion of the desktop and not just to the bounding rectangle.

Reproducible: Always

Steps to Reproduce:
1. Have a weird non-rectangular desktop, with no monitor in the upper left-hand portion.
2. Open the system activity dialog.
3. Notice that you can't see said dialog because it opened offscreen.

Actual Results:  
Dialog opens where there's no monitor to display it.

Expected Results:  
Dialog opens someplace where a monitor exists to display it.
Comment 1 Valerii Malov 2018-03-11 14:36:14 UTC
Git commit ad5b9e98b1f255a83d04dfb5dbc8b31d32e91d53 by Valeriy Malov.
Committed on 11/03/2018 at 14:36.
Pushed by valeriymalov into branch 'master'.

Center systemmonitor window properly on multi-screen setup

Summary:
Do not force geometry or window hints when opening systemmonitor
This should let it position properly on a multi-monitor setup and reduce interference with user-set KWin preferences
Related: bug 356706

Reviewers: #plasma_workspaces, aacid, mart

Reviewed By: mart

Subscribers: davidedmundson, sebas, aacid, graesslin, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3484

M  +8    -42   systemmonitor/ksystemactivitydialog.cpp
M  +2    -3    systemmonitor/ksystemactivitydialog.h

https://commits.kde.org/plasma-workspace/ad5b9e98b1f255a83d04dfb5dbc8b31d32e91d53
Comment 2 Jason Tibbitts 2018-03-11 15:21:38 UTC
Thanks so much!