~ci-train-bot/unity8/unity8-ubuntu-zesty-2246

« back to all changes in this revision

Viewing changes to qml/Components/InputMethod.qml

  • Committer: Bileto Bot
  • Author(s): Daniel d'Andrada
  • Date: 2016-12-01 19:36:51 UTC
  • mfrom: (2725.1.4 miral)
  • Revision ID: ci-train-bot@canonical.com-20161201193651-lr2rb0twy2ggwh67
Let the model deal with some window management decisions

eg: which window to focus, whether to change surface state

unity8 requests and reacts to changes in the model instead of applying them (LP: #1346633)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
    readonly property rect visibleRect: surfaceItem.surface && visible ? surfaceItem.surface.inputBounds : Qt.rect(0, 0, 0, 0)
25
25
 
 
26
    property var surface
 
27
 
26
28
    MirSurfaceItem {
27
29
        id: surfaceItem
28
30
        anchors.fill: parent
31
33
 
32
34
        surfaceWidth: root.enabled ? width : -1
33
35
        surfaceHeight: root.enabled ? height : -1
34
 
        surface: SurfaceManager.inputMethodSurface
 
36
        surface: root.surface
35
37
 
36
38
        onLiveChanged: {
37
39
            if (surface !== null && !live) {
50
52
    }
51
53
 
52
54
    visible: surfaceItem.surface &&
53
 
              surfaceItem.surfaceState != Mir.HiddenState &&
54
 
              surfaceItem.surfaceState != Mir.MinimizedState &&
55
 
              root.enabled
 
55
             surfaceItem.surface.visible &&
 
56
             root.enabled
56
57
}