From 371a29096bf5f13b0e68fa802941ba78cb3d25b0 Mon Sep 17 00:00:00 2001 From: Michael Hohmuth Date: Tue, 4 Sep 2012 23:36:39 +0200 Subject: [PATCH] Do not autoraise a window unless the mouse has been moved. Fixes unintended autoraises when switching workspaces. BUG: 306281 FIXED-IN: 4.9.2 --- events.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/events.cpp b/events.cpp index 6856922e76..ae7ebb6100 100644 --- a/events.cpp +++ b/events.cpp @@ -882,8 +882,10 @@ void Client::enterNotifyEvent(XCrossingEvent* e) if (options->focusPolicy() == Options::ClickToFocus || workspace()->windowMenuShown()) return; + QPoint currentPos(e->x_root, e->y_root); if (options->isAutoRaise() && !isDesktop() && !isDock() && workspace()->focusChangeEnabled() && + currentPos != workspace()->focusMousePosition() && workspace()->topClientOnDesktop(workspace()->currentDesktop(), options->isSeparateScreenFocus() ? screen() : -1) != this) { delete autoRaiseTimer; @@ -893,7 +895,6 @@ void Client::enterNotifyEvent(XCrossingEvent* e) autoRaiseTimer->start(options->autoRaiseInterval()); } - QPoint currentPos(e->x_root, e->y_root); if (isDesktop() || isDock()) return; // for FocusFollowsMouse, change focus only if the mouse has actually been moved, not if the focus