wayland: Prefer input()->pointer()->pos() over cursor pos
On Wayland, the cursor primarily visual role, not functional. Interactive move resize should get the position from the corresponding input device.
This commit is contained in:
parent
777c2bdb18
commit
0987b55cdd
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "decorations/decorationbridge.h"
|
||||
#include "deleted.h"
|
||||
#include "placement.h"
|
||||
#include "pointer_input.h"
|
||||
#include "screenedge.h"
|
||||
#include "touch_input.h"
|
||||
#include "utils/subsurfacemonitor.h"
|
||||
|
@ -1121,7 +1122,7 @@ void XdgToplevelWindow::handleMoveRequested(SeatInterface *seat, quint32 serial)
|
|||
if (isMovable()) {
|
||||
QPointF cursorPos;
|
||||
if (seat->hasImplicitPointerGrab(serial)) {
|
||||
cursorPos = Cursors::self()->mouse()->pos();
|
||||
cursorPos = input()->pointer()->pos();
|
||||
} else {
|
||||
cursorPos = input()->touch()->position();
|
||||
}
|
||||
|
@ -1145,7 +1146,7 @@ void XdgToplevelWindow::handleResizeRequested(SeatInterface *seat, XdgToplevelIn
|
|||
setInteractiveMoveResizePointerButtonDown(true);
|
||||
QPointF cursorPos;
|
||||
if (seat->hasImplicitPointerGrab(serial)) {
|
||||
cursorPos = Cursors::self()->mouse()->pos();
|
||||
cursorPos = input()->pointer()->pos();
|
||||
} else {
|
||||
cursorPos = input()->touch()->position();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue