Commit Graph

7 Commits (02c4ae10027b32fec111828808395423f8335eb1)

Author SHA1 Message Date
Martin Gräßlin 6b1f0b1fca [kwin] Introduce Screens::size and Screens::geometry
Screens provides a size which is constructed from the size of
the bounding geometry of all screens and provides an overload taking
an int to return the size of a specified screen. For geometry() a new
ovload is added without an argument, which is just a convenient wrapper
for QRect(QPoint(0, 0), size()).

Both new methods are exported to effects and scripting as new
properties there called virtualScreenSize and virtualScreenGeometry.

The (virtual) size gets cached in screens and is updated whenever the
count or geometry changes.

Construction of Screens is slightly changed by moving the init code
from ctor into a virtual method init(). Reason is that we ended in
a loop with accessing the singleton pointer before it was set.

REVIEW: 116114
2014-03-05 13:03:33 +01:00
Martin Gräßlin 5f7eab206d [kwin] Introduce a currentChanged signal in screens 2013-12-12 09:37:29 +01:00
Thomas Lübking c6580ce696 add int Screens::intersecting(QRect)
REVIEW: 112910
2013-09-25 21:38:17 +02:00
Thomas Lübking ee45592d85 validate screens w/o direct update
largely reverts b164e9912c9b5f9c9ae619bbd79355d317174115
which prevented the crash but due to early screen updating
causes issues with scene/overlay update on at least intel chips

BUG: 322970
FIXED-IN: 4.11
CCBUG: 322156
REVIEW: https://git.reviewboard.kde.org/r/111811/
2013-08-06 10:29:21 +02:00
Martin Gräßlin 4a48325de5 Cleanup and reorder includes in client.h
Removing the workspace include required to include it in many other
places.
2013-04-29 08:42:36 +02:00
Thomas Lübking c380acca3f fix screen count alignment
REVIEW: 110119
2013-04-28 17:39:17 +02:00
Martin Gräßlin edb074cbc2 Split out screen handling from Workspace into own class Screens
Following the approaches of other split out functionality Screens is a
singleton class created by Workspace.

The class takes over the responsibility for:
* screenChanged signal delayed by timer
* number of screens
* geometry of given screen
* active screen
* config option for active screen follows mouse

The class contains a small abstraction layer and has a concrete subclass
wrapping around QDesktopWidget, but the idea is to go more low level and
interact with XRandR directly to get more detailed information.

All over KWin the usage from QDesktopWidget is ported over to the new
Screens class.

REVIEW: 109839
2013-04-15 10:25:10 +02:00