@@ -294,18 +294,17 @@ void Desktop::warpCursor(const QPoint &position) {
294294 // Using uinput, the cursor can only be moved relative to its current
295295 // position. That's because hardware mouse input is naturally relative.
296296 // To get absolute mouse movement, we employ a trick.
297- // The following trick doesn't work: We can't move the mouse relatively -9999 -9999
298- // to get the mouse to the top left corner of the screen.
299- // But moving it then by 100 100 doesn't result in the mouse
300- // being at 100 100 unfortunately. For some reason it works when the mouse
301- // has been placed at 0 0 before manually.
302- // Fortunately, the Xlib allows us to warp the pointer/cursor to a absolute position.
303- // But mouseinput generated by Xlib is flagged as fake input and thus ignored by some
304- // programs, particulary games. We use a combined efford to move the mouse
305- // to the desired position while hacing it accepted by all programs: We move
306- // the mouse using xlib to the desired position and then shake the cursor a
307- // little using input to make all programs recognise the cursors new
308- // position.
297+ // The following trick doesn't work: We can't move the mouse relatively
298+ // -9999 -9999 to get the mouse to the top left corner of the screen. But
299+ // moving it then by 100 100 doesn't result in the mouse being at 100 100
300+ // unfortunately. For some reason it works when the mouse has been placed at
301+ // 0 0 before manually. Fortunately, the Xlib allows us to warp the
302+ // pointer/cursor to a absolute position. But mouseinput generated by Xlib
303+ // is flagged as fake input and thus ignored by some programs, particulary
304+ // games. We use a combined efford to move the mouse to the desired position
305+ // while hacing it accepted by all programs: We move the mouse using xlib to
306+ // the desired position and then shake the cursor a little using input to
307+ // make all programs recognise the cursors new position.
309308
310309 // If dest_w is None, XWarpPointer moves the pointer by the offsets (dest_x,
311310 // dest_y) relative to the current position of the pointer.
0 commit comments