Bug 584822 - kwin uses smart placement instead of cascade in multi-screen even if cascade placement is selected
kwin uses smart placement instead of cascade in multi-screen even if cascade ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kdebase (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Ngo Than
desktop-bugs@redhat.com
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-22 10:10 EDT by Olivier Fourdan
Modified: 2013-04-15 05:09 EDT (History)
4 users (show)

See Also:
Fixed In Version: kdebase-3.5.4-24.el5
Doc Type: Bug Fix
Doc Text:
On a system with dual screens enabled, selecting the "Cascade" window placement option in the KDE Control Center and opening a new window on the second screen could cause KWin to consider the new window off screen, and thus change the window placement back to "Smart". This update corrects the window placement algorithm to take into account the position of the screens, so that the "Cascade" window placement now works on both screens.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-11 03:31:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for kwin in kde4 (1.31 KB, patch)
2010-04-22 10:12 EDT, Olivier Fourdan
no flags Details | Diff
Patch for kwin in kde 3.5 in el5 (1.30 KB, patch)
2010-04-22 10:13 EDT, Olivier Fourdan
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0501 normal SHIPPED_LIVE kdebase bug fix update 2011-05-11 03:30:21 EDT

  None (edit)
Description Olivier Fourdan 2010-04-22 10:10:47 EDT
Description of problem:

When using multiscreen with placement set to cascade, kwin will reset to smart placement as soon as a a window is opened on the second monitor.

Version-Release number of selected component (if applicable):

kdebase-3.5.4-20.el5 but also present in current svn trunk upstream

How reproducible:

Always

Steps to Reproduce:
1. Configure a system with multi-screen (dual-head)
2. Run KDE
3. Select "Cascade" placement in KDE Control Center => Desktop => Window Behavior => "Moving" tab => "Placement" option
4. On the first monitor, select the root menu, Konsole a few times, the windows appear in cascade as expected
5. Redo the same on the other monitor
  
Actual results:

Windows are not placed in cascade and placement is reverted to "Smart" placement (even on the first monitor)

Expected results:

Windows are placed in cascade on both monitors

Additional info:

The problem comes from Placement::placeCascaded() in kwin/placement.cpp, the ode is fairly old (1998) and does not take into account the actual position of the monitors, just their size.

Therefore when opening a window on the second monitor, the coordonates are considered off screen and placement is set back to smart placement.

The same code and the same problem is still present in current kde 4 (svn trunk), I shall upload a patch for kde3 (in el5) and also kde 4 for upstream.
Comment 1 Olivier Fourdan 2010-04-22 10:12:21 EDT
Created attachment 408332 [details]
Patch for kwin in kde4

This patch is to be sent upstream if considered as a satisfactory solution.
Comment 2 Olivier Fourdan 2010-04-22 10:13:28 EDT
Created attachment 408335 [details]
Patch for kwin in kde 3.5 in el5

Same patch for kwin in kdebase 3.5 on el5.
Comment 3 Ngo Than 2010-05-05 06:49:26 EDT
Oliver, thabks for the patch, i will send the the patch to upstream
Comment 5 RHEL Product and Program Management 2010-08-09 14:33:14 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 7 RHEL Product and Program Management 2011-01-11 15:57:49 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 8 RHEL Product and Program Management 2011-01-11 17:41:19 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 12 Jaromir Hradilek 2011-03-30 09:49:50 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
On a system with dual screens enabled, selecting the "Cascade" window placement option in the KDE Control Center and opening a new window on the second screen could cause KWin to consider the new window off screen, and thus change the window placement back to "Smart". This update corrects the window placement algorithm to take into account the position of the screens, so that the "Cascade" window placement now works on both screens.
Comment 14 errata-xmlrpc 2011-05-11 03:31:33 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0501.html

Note You need to log in before you can comment on or make changes to this bug.