1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Implement window_start_drag on Windows and Linux.

This commit is contained in:
Pāvels Nadtočajevs
2024-12-16 10:01:07 +02:00
parent 4364ed6ccd
commit 293be04ec8
9 changed files with 82 additions and 1 deletions

View File

@@ -3803,6 +3803,21 @@ DisplayServer::VSyncMode DisplayServerWindows::window_get_vsync_mode(WindowID p_
return DisplayServer::VSYNC_ENABLED;
}
void DisplayServerWindows::window_start_drag(WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
ReleaseCapture();
POINT coords;
GetCursorPos(&coords);
ScreenToClient(wd.hWnd, &coords);
SendMessage(wd.hWnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(coords.x, coords.y));
}
void DisplayServerWindows::set_context(Context p_context) {
}