Skip to content
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

Fix unfocused windows can't be dragged #95606

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hilderin
Copy link
Contributor

The source of the problem was the call the ReleaseCapture in _process_activate_event and _set_mouse_mode_impl. ReleaseCapture causes the window movement to stop and receive a WM_EXITSIZEMOVE.

Before #93976 the _process_activate_event was not called in the situation where the activation and the move timer were active at the same time because the move timer replaced the activation timer.

I added the method _has_moving_window to check if a window is currently being moved and used it before calling ReleaseCapture. That fixed the problem. I also tested when having multiple opened windows in the editor (ex: Script editor).

The only problem I could think of is if ReleaseCapture had to be called on window activation while a window is being moved by the user. ReleaseCapture is not called anymore in _set_mouse_mode_impl. That's why I added a _set_mouse_mode_impl when receiving WM_EXITSIZEMOVE.

@Hilderin Hilderin requested a review from a team as a code owner August 16, 2024 03:11
@tetrapod00
Copy link
Contributor

Tested, works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release platform:windows regression topic:gui topic:porting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unfocused windows can't be dragged.
4 participants