Bug 304520 - flip switch incorrectly aligns window height on multiple monitors
Summary: flip switch incorrectly aligns window height on multiple monitors
Alias: None
Product: kwin
Classification: Plasma
Component: effects-tabbox (show other bugs)
Version: 4.9.0
Platform: unspecified Linux
: NOR normal
Target Milestone: 4.9.1
Assignee: Martin Flöser
URL: https://git.reviewboard.kde.org/r/105...
Depends on:
Reported: 2012-08-03 19:47 UTC by Saurabh Asthana
Modified: 2012-08-10 14:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.1
mgraesslin: ReviewRequest+

Monitor configuration (78.58 KB, image/png)
2012-08-06 23:05 UTC, Saurabh Asthana

Note You need to log in before you can comment on or make changes to this bug.
Description Saurabh Asthana 2012-08-03 19:47:55 UTC
Currently flip switch aligns the bottom edge of the front window based on your options (which is incorrect, incidentally, as you can see if you change the options so that the front window aligns to the top - all the windows flip off the screen). If you have multiple monitors, however, this alignment fails for windows that are not on the main head (or perhaps for windows on a head that have +/- Absolute vertical positioning).

For example, if I have a window on my main head and a window on my alt head, if I hit alt-tab on the main head, flip will show up on the main head and align windows correctly with the bottom edge. However, if I hit alt-tab on the alt head, flip will show up on the alt head, but only the window that is on the alt-head will line up with the bottom of the screen correctly; the window from the main head will be floating above the bottom when I bring it to the front of the stack.

My monitor setup:
Main: 1920x1080, Absolute position at (0,0)
Alt: 1366x768, Absolute position at (1920,500)

Reproducible: Always
Comment 1 Saurabh Asthana 2012-08-03 19:52:53 UTC
Okay, this is only a problem if I have one of the monitors vertically offset with respect to the other, even if it's only by 1 pixel.
Comment 2 Martin Flöser 2012-08-04 11:08:55 UTC
can you please provide a very precise description of the layout of your 
screens? This is important in order to reproduce it (have two screens with 
different resolution and so far never noticed a problem when testing).
Comment 3 Saurabh Asthana 2012-08-04 17:19:31 UTC
Can you specify what details you need other than the positioning and size above? The main monitor is a 27" LCD, the alt is my Sony Vaio E-series laptop screen.
Comment 4 Martin Flöser 2012-08-04 18:02:07 UTC
best would be a screenshot of the control module which shows the layout
Comment 5 Saurabh Asthana 2012-08-06 23:05:54 UTC
Created attachment 73000 [details]
Monitor configuration
Comment 6 Martin Flöser 2012-08-09 10:55:32 UTC
Thanks for the screenshot, that helped a lot to understand the issue.
Comment 7 Martin Flöser 2012-08-10 14:58:15 UTC
Git commit 65ab2fde8f017e7b59a8bf065a74d5ae40db4bd2 by Martin Gräßlin.
Committed on 09/08/2012 at 12:51.
Pushed by graesslin into branch 'KDE/4.9'.

Properly calculate the offset between multiple screens in FlipSwitch

The code assumed that screens border to each other. That is the height
of the one screen is the y position of the other screen.
FIXED-IN: 4.9.1
REVIEW: 105958

M  +2    -2    kwin/effects/flipswitch/flipswitch.cpp