diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-19 11:56:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 11:56:06 +0200 |
commit | 035d91ed73ce5d1cea1b24c7899875188565f6c0 (patch) | |
tree | f2fff4e4233f55294d4f50a7631171e404a4b72c /platform/linuxbsd/display_server_x11.cpp | |
parent | 00c0fbb8cf662c8f60958674e474a99efa190ce8 (diff) | |
parent | 7c005ba723bc546d63aac9818e8584692abec91b (diff) |
Merge pull request #63191 from bruvzg/set_screen_4
Diffstat (limited to 'platform/linuxbsd/display_server_x11.cpp')
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index b0f87484b9..ecd7723993 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -1489,8 +1489,8 @@ void DisplayServerX11::window_set_current_screen(int p_screen, WindowID p_window XMoveResizeWindow(x11_display, wd.x11_window, position.x, position.y, size.x, size.y); } else { if (p_screen != window_get_current_screen(p_window)) { - Point2i position = screen_get_position(p_screen); - XMoveWindow(x11_display, wd.x11_window, position.x, position.y); + Vector2 ofs = window_get_position(p_window) - screen_get_position(window_get_current_screen(p_window)); + window_set_position(ofs + screen_get_position(p_screen), p_window); } } } |