Force cancel of any drag in progress when Escape is pressed
when escape is pressed when dragging between different clients, cancelling any drag is compositor's responsibility BUG:405267
This commit is contained in:
parent
d789ecc6d1
commit
e00d836708
1 changed files with 16 additions and 0 deletions
|
@ -2240,6 +2240,22 @@ public:
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool keyEvent(QKeyEvent *event)
|
||||||
|
{
|
||||||
|
if (event->key() != Qt::Key_Escape) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto seat = waylandServer()->seat();
|
||||||
|
if (!seat->isDrag()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
seat->setTimestamp(event->timestamp());
|
||||||
|
|
||||||
|
seat->cancelDrag();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
void raiseDragTarget()
|
void raiseDragTarget()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue