mirror of https://github.com/godotengine/godot
Merge pull request #102311 from Hilderin/fix-floating-window-not-visible-after-restore
Fix Floating Window not visible after restore on KDE
This commit is contained in:
commit
ab0c712bf5
|
|
@ -261,6 +261,11 @@ void WindowWrapper::restore_window_from_saved_position(const Rect2 p_window_rect
|
||||||
window_rect = Rect2i(window_rect.position * screen_ratio, window_rect.size * screen_ratio);
|
window_rect = Rect2i(window_rect.position * screen_ratio, window_rect.size * screen_ratio);
|
||||||
window_rect.position += real_screen_rect.position;
|
window_rect.position += real_screen_rect.position;
|
||||||
|
|
||||||
|
// Make sure to restore the window if the user minimized it the last time it was displayed.
|
||||||
|
if (window->get_mode() == Window::MODE_MINIMIZED) {
|
||||||
|
window->set_mode(Window::MODE_WINDOWED);
|
||||||
|
}
|
||||||
|
|
||||||
// All good, restore the window.
|
// All good, restore the window.
|
||||||
window->set_current_screen(p_screen);
|
window->set_current_screen(p_screen);
|
||||||
if (window->is_visible()) {
|
if (window->is_visible()) {
|
||||||
|
|
|
||||||
|
|
@ -4767,6 +4767,13 @@ void DisplayServerX11::process_events() {
|
||||||
|
|
||||||
// Have we failed to set fullscreen while the window was unmapped?
|
// Have we failed to set fullscreen while the window was unmapped?
|
||||||
_validate_mode_on_map(window_id);
|
_validate_mode_on_map(window_id);
|
||||||
|
|
||||||
|
// On KDE Plasma, when the parent window of an embedded process is restored after being minimized,
|
||||||
|
// only the embedded window receives the Map notification, causing it to
|
||||||
|
// appear without its parent.
|
||||||
|
if (wd.embed_parent) {
|
||||||
|
XMapWindow(x11_display, wd.embed_parent);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case Expose: {
|
case Expose: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue