~unity-2d-team/unity-2d/trunk

« back to all changes in this revision

Viewing changes to shell/common/Background.qml

  • Committer: Tarmac
  • Author(s): Albert Astals, LDS, Lohith D Shivamurthy, Ugo Riboni
  • Date: 2012-03-15 10:33:11 UTC
  • mfrom: (915.5.120 Shell-MultiMonitor)
  • Revision ID: tarmac-20120315103311-8ujg3ct3q7fmy5cj
[all] implement multimonitor support in the shell

* allow launcher-per-screen configuration
* HUD and Dash follow mouse cursor
* panel per-screen, also on non-top screens
* spread per-screen
* support the switch to a single launcher on primary monitor. Fixes: https://bugs.launchpad.net/bugs/780204, https://bugs.launchpad.net/bugs/844798, https://bugs.launchpad.net/bugs/844809, https://bugs.launchpad.net/bugs/947145, https://bugs.launchpad.net/bugs/954175. Approved by Michał Sawicz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    property bool fullscreen: false
28
28
    property int bottomBorderThickness
29
29
    property int rightBorderThickness
 
30
    property bool activeTriggerHelper: true
 
31
    property bool reallyActive: active && activeTriggerHelper
 
32
    property variant view: undefined
 
33
 
 
34
    function trigger()
 
35
    {
 
36
        activeTriggerHelper = false
 
37
        activeTriggerHelper = true
 
38
    }
30
39
 
31
40
    /* Avoid redraw at rendering */
32
41
    effect: CacheEffect {}
49
58
 
50
59
            /* Use an image of the root window which essentially is a
51
60
               capture of the entire screen */
52
 
            source: active ? "image://window/root" : ""
 
61
            source: reallyActive ? "image://window/root" : ""
53
62
            cache: false
54
63
 
55
64
            fillMode: Image.PreserveAspectCrop
57
66
            /* Place the screenshot of the desktop background on top of the desktop background,
58
67
               no matter where the DeclarativeView or the parent object are placed.
59
68
            */
60
 
            property variant origin: parent.mapFromItem(null, -declarativeView.globalPosition.x, -declarativeView.globalPosition.y)
 
69
            property variant origin: parent.mapFromItem(null, background.view != undefined ? -background.view.globalPosition.x : -declarativeView.globalPosition.x,
 
70
                                                              background.view != undefined ? -background.view.globalPosition.y : -declarativeView.globalPosition.y)
61
71
            x: origin.x
62
72
            y: origin.y
63
73
        }