You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Re-apply "Fixes for windows in X11 tiling WMs"
From PR #38727 which was reverted in #41373 because of regressions in Ubuntu with Gnome. Co-authored-by: Lorenzo Cerqua <lorenzocerqua@tutanota.com>
This commit is contained in:
@@ -681,6 +681,14 @@ DisplayServer::WindowID DisplayServerX11::create_sub_window(WindowMode p_mode, u
|
||||
return id;
|
||||
}
|
||||
|
||||
void DisplayServerX11::show_window(WindowID p_id) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
WindowData &wd = windows[p_id];
|
||||
|
||||
XMapWindow(x11_display, wd.x11_window);
|
||||
}
|
||||
|
||||
void DisplayServerX11::delete_sub_window(WindowID p_id) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
@@ -3145,8 +3153,6 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, u
|
||||
WindowData wd;
|
||||
wd.x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo->screen), p_rect.position.x, p_rect.position.y, p_rect.size.width > 0 ? p_rect.size.width : 1, p_rect.size.height > 0 ? p_rect.size.height : 1, 0, visualInfo->depth, InputOutput, visualInfo->visual, valuemask, &windowAttributes);
|
||||
|
||||
XMapWindow(x11_display, wd.x11_window);
|
||||
|
||||
//associate PID
|
||||
// make PID known to X11
|
||||
{
|
||||
@@ -3316,6 +3322,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, u
|
||||
if (cursors[current_cursor] != None) {
|
||||
XDefineCursor(x11_display, wd.x11_window, cursors[current_cursor]);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -3555,6 +3562,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||
window_set_flag(WindowFlags(i), true, main_window);
|
||||
}
|
||||
}
|
||||
show_window(main_window);
|
||||
|
||||
//create RenderingDevice if used
|
||||
#if defined(VULKAN_ENABLED)
|
||||
|
||||
Reference in New Issue
Block a user