mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #102744 from Hilderin/fix-floating-window-freeze-when-moving
Fix Game and editor freeze when clicking on the game's title bar
This commit is contained in:
@@ -6173,6 +6173,15 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
|
||||
|
||||
wd.parent_hwnd = p_parent_hwnd;
|
||||
|
||||
// Detach the input queue from the parent window.
|
||||
// This prevents the embedded window from waiting on the main window's input queue,
|
||||
// causing lags input lags when resizing or moving the main window.
|
||||
if (p_parent_hwnd) {
|
||||
DWORD mainThreadId = GetWindowThreadProcessId(owner_hwnd, nullptr);
|
||||
DWORD embeddedThreadId = GetCurrentThreadId();
|
||||
AttachThreadInput(embeddedThreadId, mainThreadId, FALSE);
|
||||
}
|
||||
|
||||
if (p_mode == WINDOW_MODE_FULLSCREEN || p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
|
||||
wd.fullscreen = true;
|
||||
if (p_mode == WINDOW_MODE_FULLSCREEN) {
|
||||
|
||||
Reference in New Issue
Block a user