@@ -19,6 +19,7 @@
19import QtQuick 2.3
19import QtQuick 2.3
20import Ubuntu.Components 1.1
20import Ubuntu.Components 1.1
21import Utils 0.1
21import Utils 0.1
22+import Unity.Application 0.1
23MouseArea {
24MouseArea {
@@ -31,6 +32,7 @@ MouseArea {
31 // The area will anchor to it and manage move and resize events
32 // The area will anchor to it and manage move and resize events
32 property Item target: null
33 property Item target: null
33 property string windowId: ""
34 property string windowId: ""
35+ property string appId: ""
34 property int resizeHandleWidth: 0
36 property int resizeHandleWidth: 0
35 property int minWidth: 0
37 property int minWidth: 0
36 property int minHeight: 0
38 property int minHeight: 0
@@ -46,7 +48,6 @@ MouseArea {
46 property bool resizeBottom: false
48 property bool resizeBottom: false
47 property bool resizeLeft: false
49 property bool resizeLeft: false
48 property bool resizeRight: false
50 property bool resizeRight: false
52 Component.onCompleted: {
53 Component.onCompleted: {
@@ -60,6 +61,7 @@ MouseArea {
62 onPressed: {
63 onPressed: {
64+ ApplicationManager.focusApplication(root.appId)
63 priv.startPoint = Qt.point(mouse.x, mouse.y);
65 priv.startPoint = Qt.point(mouse.x, mouse.y);
64 priv.resizeTop = mouseY < root.resizeHandleWidth;
66 priv.resizeTop = mouseY < root.resizeHandleWidth;
65 priv.resizeBottom = mouseY > (root.height - root.resizeHandleWidth);
67 priv.resizeBottom = mouseY > (root.height - root.resizeHandleWidth);