Fix unfocused windows can't be dragged #95606
Open
+26
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 aWM_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 callingReleaseCapture
. 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 receivingWM_EXITSIZEMOVE
.