Activate clients on drag enter

Summary:
We currently only raise a client when a drag enters it and not activate it.
This is confusing since afterwards the raised window has not keyboard focus
although visually being in front of the window the drag originated from.

Therefore activate entered windows instead of only raising them.

Test Plan: Manually and autotests still pass.

Reviewers: #kwin, hein

Reviewed By: hein

Subscribers: anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15225
This commit is contained in:
Roman Gilg 2018-09-02 23:01:48 +02:00
parent 03a2a05fc7
commit 1fada99478

View file

@ -1512,7 +1512,7 @@ public:
// TODO: consider decorations
if (t->surface() != seat->dragSurface()) {
if (AbstractClient *c = qobject_cast<AbstractClient*>(t)) {
workspace()->raiseClient(c);
workspace()->activateClient(c);
}
seat->setPointerPos(event->globalPos());
seat->setDragTarget(t->surface(), event->globalPos(), t->inputTransformation());