diff --git a/abstract_client.cpp b/abstract_client.cpp index 1d233c7bbb..8820e6d0fe 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1523,4 +1523,13 @@ void AbstractClient::enterEvent(const QPoint &globalPos) } } +void AbstractClient::leaveEvent() +{ + cancelAutoRaise(); + workspace()->cancelDelayFocus(); + // TODO: shade hover + // TODO: send hover leave to deco + // TODO: handle Options::FocusStrictlyUnderMouse +} + } diff --git a/abstract_client.h b/abstract_client.h index fe88ed2870..fff6febf01 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -407,6 +407,7 @@ public: void keyPressEvent(uint key_code); void enterEvent(const QPoint &globalPos); + void leaveEvent(); /** * These values represent positions inside an area diff --git a/events.cpp b/events.cpp index 3cc0afd17c..61462abbe9 100644 --- a/events.cpp +++ b/events.cpp @@ -978,8 +978,7 @@ void Client::leaveNotifyEvent(xcb_leave_notify_event_t *e) } } if (lostMouse) { - cancelAutoRaise(); - workspace()->cancelDelayFocus(); + leaveEvent(); cancelShadeHoverTimer(); if (shade_mode == ShadeHover && !isMoveResize() && !isMoveResizePointerButtonDown()) { shadeHoverTimer = new QTimer(this);