Skip to content
  • Martin Flöser's avatar
    [kwin] Introduce Screens::size and Screens::geometry · 6b1f0b1f
    Martin Flöser authored
    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
    6b1f0b1f