mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Disable multi window support on Linux by default as it causes issues
Fixes #1026
This commit is contained in:
@@ -883,12 +883,16 @@ namespace hex {
|
||||
io.ConfigWindowsMoveFromTitleBarOnly = true;
|
||||
io.FontGlobalScale = 1.0F;
|
||||
|
||||
// Disable multi-window support on Wayland since it doesn't support it
|
||||
if (glfwGetPrimaryMonitor() != nullptr) {
|
||||
auto sessionType = hex::getEnvironmentVariable("XDG_SESSION_TYPE");
|
||||
bool multiWindowEnabled = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", 1) != 0;
|
||||
#if defined (OS_LINUX)
|
||||
constexpr static auto MultiWindowSupportEnabledDefault = 0;
|
||||
#else
|
||||
constexpr static auto MultiWindowSupportEnabledDefault = 1;
|
||||
#endif
|
||||
|
||||
if ((!sessionType || !hex::containsIgnoreCase(*sessionType, "wayland")) && multiWindowEnabled)
|
||||
bool multiWindowEnabled = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", MultiWindowSupportEnabledDefault) != 0;
|
||||
|
||||
if (multiWindowEnabled)
|
||||
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user