Move leaveNotify event handling to AbstractClient

Only most basic to cancel auto raise and delayed focus.
This commit is contained in:
Martin Gräßlin 2016-02-18 13:00:50 +01:00
parent 8ee550292f
commit c6e6d9a872
3 changed files with 11 additions and 2 deletions

View file

@ -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
}
}

View file

@ -407,6 +407,7 @@ public:
void keyPressEvent(uint key_code);
void enterEvent(const QPoint &globalPos);
void leaveEvent();
/**
* These values represent positions inside an area

View file

@ -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);