@@ -24,10 +24,9 @@ import "../Components"
27− property var uinput: UInput {
27+
28− Component.onCompleted: createMouse();
28+ Component.onCompleted: UInput.createMouse()
29− Component.onDestruction: removeMouse();
29+ Component.onDestruction: UInput.removeMouse()
32 Component.onCompleted: {
31 Component.onCompleted: {
33 if (!settings.touchpadTutorialHasRun) {
32 if (!settings.touchpadTutorialHasRun) {
@@ -85,7 +84,7 @@ Item {
85 if (((point1.pressed && !point2.pressed) || (!point1.pressed && point2.pressed))
84 if (((point1.pressed && !point2.pressed) || (!point1.pressed && point2.pressed))
86 && clickTimer.running) {
85 && clickTimer.running) {
87 clickTimer.stop();
86 clickTimer.stop();
88− uinput.pressMouse(UInput.ButtonLeft)
87+ UInput.pressMouse(UInput.ButtonLeft)
89 isDoubleClick = true;
88 isDoubleClick = true;
91 isClick = true;
90 isClick = true;
@@ -104,7 +103,7 @@ Item {
105 onReleased: {
104 onReleased: {
106 if (isDoubleClick || isDrag) {
105 if (isDoubleClick || isDrag) {
107− uinput.releaseMouse(UInput.ButtonLeft)
106+ UInput.releaseMouse(UInput.ButtonLeft)
108 isDoubleClick = false;
107 isDoubleClick = false;
110 if (isClick) {
109 if (isClick) {
@@ -120,8 +119,8 @@ Item {
120 interval: 200
119 interval: 200
121 property int button: UInput.ButtonLeft
120 property int button: UInput.ButtonLeft
122 onTriggered: {
121 onTriggered: {
123− uinput.pressMouse(button);
122+ UInput.pressMouse(button);
124− uinput.releaseMouse(button);
123+ UInput.releaseMouse(button);
126 function scheduleClick(button) {
125 function scheduleClick(button) {
127 clickTimer.button = button;
126 clickTimer.button = button;
@@ -138,7 +137,7 @@ Item {
138 isDrag = true;
137 isDrag = true;
141− uinput.moveMouse(tp.x - tp.previousX, tp.y - tp.previousY);
140+ UInput.moveMouse(tp.x - tp.previousX, tp.y - tp.previousY);
144 function scroll(touchPoints) {
143 function scroll(touchPoints) {
@@ -166,7 +165,7 @@ Item {
169− uinput.scrollMouse(dh, dv);
168+ UInput.scrollMouse(dh, dv);
172 touchPoints: [
171 touchPoints: [
@@ -189,8 +188,8 @@ Item {
189 objectName: "leftButton"
188 objectName: "leftButton"
190 Layout.fillWidth: true
189 Layout.fillWidth: true
191 Layout.fillHeight: true
190 Layout.fillHeight: true
192− onPressed: uinput.pressMouse(UInput.ButtonLeft);
191+ onPressed: UInput.pressMouse(UInput.ButtonLeft);
193− onReleased: uinput.releaseMouse(UInput.ButtonLeft);
192+ onReleased: UInput.releaseMouse(UInput.ButtonLeft);
194 property bool highlight: false
193 property bool highlight: false
195 UbuntuShape {
194 UbuntuShape {
196 anchors.fill: parent
195 anchors.fill: parent
@@ -204,8 +203,8 @@ Item {
204 objectName: "rightButton"
203 objectName: "rightButton"
205 Layout.fillWidth: true
204 Layout.fillWidth: true
206 Layout.fillHeight: true
205 Layout.fillHeight: true
207− onPressed: uinput.pressMouse(UInput.ButtonRight);
206+ onPressed: UInput.pressMouse(UInput.ButtonRight);
208− onReleased: uinput.releaseMouse(UInput.ButtonRight);
207+ onReleased: UInput.releaseMouse(UInput.ButtonRight);
209 property bool highlight: false
208 property bool highlight: false
210 UbuntuShape {
209 UbuntuShape {
211 anchors.fill: parent
210 anchors.fill: parent