Skip to content

Commit a63a8b4

Browse files
committed
Merge pull request #102104 from Hilderin/fix-embedded-game-disappear-when-not-focused
Fix Embedded Game disappear when not focused on KDE 5
2 parents f899138 + f7d1558 commit a63a8b4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

platform/linuxbsd/x11/display_server_x11.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6276,7 +6276,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
62766276
}
62776277
}
62786278

6279-
if (wd.is_popup || wd.no_focus || wd.embed_parent) {
6279+
if (wd.is_popup || wd.no_focus || (wd.embed_parent && !kde5_embed_workaround)) {
62806280
// Set Utility type to disable fade animations.
62816281
Atom type_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE_UTILITY", False);
62826282
Atom wt_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE", False);
@@ -6422,6 +6422,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
64226422
KeyMappingX11::initialize();
64236423

64246424
xwayland = OS::get_singleton()->get_environment("XDG_SESSION_TYPE").to_lower() == "wayland";
6425+
kde5_embed_workaround = OS::get_singleton()->get_environment("XDG_CURRENT_DESKTOP").to_lower() == "kde" && OS::get_singleton()->get_environment("KDE_SESSION_VERSION") == "5";
64256426

64266427
native_menu = memnew(NativeMenu);
64276428
context = p_context;

platform/linuxbsd/x11/display_server_x11.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ class DisplayServerX11 : public DisplayServer {
338338
bool xinerama_ext_ok = true;
339339
bool xshaped_ext_ok = true;
340340
bool xwayland = false;
341+
bool kde5_embed_workaround = false; // Workaround embedded game visibility on KDE 5 (GH-102043).
341342

342343
struct Property {
343344
unsigned char *data;

0 commit comments

Comments
 (0)