summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorNikola Bunjevac <nikola.bunjevac@gmail.com>2022-10-11 23:04:48 +0200
committerNikola Bunjevac <nikola.bunjevac@gmail.com>2022-10-11 23:27:21 +0200
commit882d40fa118b72202fd473a9c2b196006b6d9b1f (patch)
treef510b3682a5857704cd939140d1ce47ded40e845 /platform
parent927bcfe646f045c984707b800f5f49f0e026b793 (diff)
Keep rendering context window size in sync when resizing
On X11 we rely on ConfigureNotify event to update rendering context window size, but we don't get such event when resizing programmatically, only when done "manually" by resizing the window etc.
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/display_server_x11.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index e0963f42ce..e78467beff 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -1729,6 +1729,18 @@ void DisplayServerX11::window_set_size(const Size2i p_size, WindowID p_window) {
usleep(10000);
}
+
+ // Keep rendering context window size in sync
+#if defined(VULKAN_ENABLED)
+ if (context_vulkan) {
+ context_vulkan->window_resize(p_window, xwa.width, xwa.height);
+ }
+#endif
+#if defined(GLES3_ENABLED)
+ if (gl_manager) {
+ gl_manager->window_resize(p_window, xwa.width, xwa.height);
+ }
+#endif
}
Size2i DisplayServerX11::window_get_size(WindowID p_window) const {