Commit Graph

9 Commits (b33425baaaf275bf0bb2bb775862c93468461feb)

Author SHA1 Message Date
Martin Gräßlin 95c6e2d7ba Wayland implementation of Screens interface
Uses the information provided by the Wayland outputs to setup the data
about the available screens.

In order to properly work together with the X Server the implementation
syncs the data to the X system using XRandR. If XRandR is not available
this is most likely going to not work correctly.
2014-03-19 14:14:40 +01:00
Martin Gräßlin 704e42163d [kwin] Add missing includes
Were missing if built stand-alone.
2014-03-18 14:37:01 +01:00
Aleix Pol c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
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
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