@@ -24,10 +24,9 @@ import "../Components"
2424
2525Item {
2626 id: root
27− property var uinput: UInput {
28− Component.onCompleted: createMouse();
29− Component.onDestruction: removeMouse();
30− }
27+
28+ Component.onCompleted: UInput.createMouse()
29+ Component.onDestruction: UInput.removeMouse()
3130
3231 Component.onCompleted: {
3332 if (!settings.touchpadTutorialHasRun) {
@@ -85,7 +84,7 @@ Item {
8584 if (((point1.pressed && !point2.pressed) || (!point1.pressed && point2.pressed))
8685 && clickTimer.running) {
8786 clickTimer.stop();
88− uinput.pressMouse(UInput.ButtonLeft)
87+ UInput.pressMouse(UInput.ButtonLeft)
8988 isDoubleClick = true;
9089 }
9190 isClick = true;
@@ -104,7 +103,7 @@ Item {
104103
105104 onReleased: {
106105 if (isDoubleClick || isDrag) {
107− uinput.releaseMouse(UInput.ButtonLeft)
106+ UInput.releaseMouse(UInput.ButtonLeft)
108107 isDoubleClick = false;
109108 }
110109 if (isClick) {
@@ -120,8 +119,8 @@ Item {
120119 interval: 200
121120 property int button: UInput.ButtonLeft
122121 onTriggered: {
123− uinput.pressMouse(button);
124− uinput.releaseMouse(button);
122+ UInput.pressMouse(button);
123+ UInput.releaseMouse(button);
125124 }
126125 function scheduleClick(button) {
127126 clickTimer.button = button;
@@ -138,7 +137,7 @@ Item {
138137 isDrag = true;
139138 }
140139
141− uinput.moveMouse(tp.x - tp.previousX, tp.y - tp.previousY);
140+ UInput.moveMouse(tp.x - tp.previousX, tp.y - tp.previousY);
142141 }
143142
144143 function scroll(touchPoints) {
@@ -166,7 +165,7 @@ Item {
166165 dh /= 2;
167166 dv /= 2;
168167
169− uinput.scrollMouse(dh, dv);
168+ UInput.scrollMouse(dh, dv);
170169 }
171170
172171 touchPoints: [
@@ -189,8 +188,8 @@ Item {
189188 objectName: "leftButton"
190189 Layout.fillWidth: true
191190 Layout.fillHeight: true
192− onPressed: uinput.pressMouse(UInput.ButtonLeft);
193− onReleased: uinput.releaseMouse(UInput.ButtonLeft);
191+ onPressed: UInput.pressMouse(UInput.ButtonLeft);
192+ onReleased: UInput.releaseMouse(UInput.ButtonLeft);
194193 property bool highlight: false
195194 UbuntuShape {
196195 anchors.fill: parent
@@ -204,8 +203,8 @@ Item {
204203 objectName: "rightButton"
205204 Layout.fillWidth: true
206205 Layout.fillHeight: true
207− onPressed: uinput.pressMouse(UInput.ButtonRight);
208− onReleased: uinput.releaseMouse(UInput.ButtonRight);
206+ onPressed: UInput.pressMouse(UInput.ButtonRight);
207+ onReleased: UInput.releaseMouse(UInput.ButtonRight);
209208 property bool highlight: false
210209 UbuntuShape {
211210 anchors.fill: parent