| 2816 | } |
| 2817 | |
| 2818 | void Window::pointerEnterEvent(const QPointF &globalPos) |
| 2819 | { |
| 2820 | if (options->isShadeHover()) { |
| 2821 | cancelShadeHoverTimer(); |
| 2822 | startShadeHoverTimer(); |
| 2823 | } |
| 2824 | |
| 2825 | if (options->focusPolicy() == Options::ClickToFocus || workspace()->userActionsMenu()->isShown()) { |
| 2826 | return; |
| 2827 | } |
| 2828 | |
| 2829 | if (options->isAutoRaise() && !isDesktop() && !isDock() && workspace()->focusChangeEnabled() && globalPos != workspace()->focusMousePosition() && workspace()->topWindowOnDesktop(VirtualDesktopManager::self()->currentDesktop(), options->isSeparateScreenFocus() ? output() : nullptr) != this) { |
| 2830 | startAutoRaise(); |
| 2831 | } |
| 2832 | |
| 2833 | if (isDesktop() || isDock()) { |
| 2834 | return; |
| 2835 | } |
| 2836 | // for FocusFollowsMouse, change focus only if the mouse has actually been moved, not if the focus |
| 2837 | // change came because of window changes (e.g. closing a window) - #92290 |
| 2838 | if (options->focusPolicy() != Options::FocusFollowsMouse |
| 2839 | || globalPos != workspace()->focusMousePosition()) { |
| 2840 | workspace()->requestDelayFocus(this); |
| 2841 | } |
| 2842 | } |
| 2843 | |
| 2844 | void Window::pointerLeaveEvent() |
| 2845 | { |
no test coverage detected