Commit e00d8367 authored by Marco Martin's avatar Marco Martin
Browse files

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
parent d789ecc6
Pipeline #144383 passed with stage
in 12 minutes and 23 seconds
......@@ -2240,6 +2240,22 @@ public:
}
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:
void raiseDragTarget()
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment