-
-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus window on scrolling #8361
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic makes sense to me
src/managers/input/InputManager.cpp
Outdated
g_pSeatManager->sendPointerMotion(e.timeMs, Vector2D{TEMPCURX, TEMPCURY} - BOX.pos()); | ||
g_pSeatManager->sendPointerFrame(); | ||
const auto PCURRWINDOW = g_pCompositor->getWindowFromSurface(g_pCompositor->m_pLastFocus.lock()); | ||
if (*PFOLLOWMOUSE == 1 && PCURRWINDOW && PWINDOW != PCURRWINDOW) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
src/managers/input/InputManager.cpp
Outdated
if (PWINDOW && PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e)) | ||
return; | ||
if (PWINDOW) { | ||
if (PWINDOW->checkInputOnDecos(INPUT_TYPE_AXIS, MOUSECOORDS, e)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
For now I daily drive this version on my pc and surface and everything looks fine |
Describe your PR, what does it fix/add?
This is the new PR for #8279. The other PR introduced a regression on merge which this implementation addresses as well.
In short: You are now able to focus a window on scroll (like with mouse-movement and button-clicks). This particularly happens, after you switched your workspace and returned back.
What does it better? It now calls the
simulateMouseMovement
only once when the window differ and also when mouse_follow event is set to 1. This should avoid weard touchpad behaviour happening in firefox when you constantly callsimulateMouseMovement
.Is it ready for merging, or does it need work?