Disable X11 on Wayland unless explicitly activated.
This commit is contained in:
@@ -51,6 +51,21 @@ struct FontConfig
|
||||
FontFlags flags;
|
||||
};
|
||||
|
||||
struct ApplicationFlags : mijin::BitFlags<ApplicationFlags>
|
||||
{
|
||||
/**
|
||||
* (Linux only) prefer X11 even when on Wayland. Required for multi-viewport support, but currently really buggy.
|
||||
* \see https://github.com/ocornut/imgui/issues/8609
|
||||
* \see https://github.com/ocornut/imgui/issues/8587
|
||||
*/
|
||||
bool x11OnWayland : 1 = false;
|
||||
};
|
||||
|
||||
struct ApplicationConfig
|
||||
{
|
||||
ApplicationFlags flags = {};
|
||||
};
|
||||
|
||||
class Application
|
||||
{
|
||||
private:
|
||||
@@ -65,6 +80,7 @@ private:
|
||||
bool mRunning = true;
|
||||
ImGuiWindowFlags mMainWindowFlags = DEFAULT_MAIN_WINDOW_FLAGS;
|
||||
std::unordered_map<ImGuiStyleVar, std::variant<float, ImVec2>> mMainWindowStyles;
|
||||
const ApplicationConfig mConfig;
|
||||
|
||||
using GLbitfield = std::uint32_t;
|
||||
using GLint = std::int32_t;
|
||||
@@ -91,8 +107,12 @@ private:
|
||||
glTexImage2D_fn_t glTexImage2D;
|
||||
glDeleteTextures_fn_t glDeleteTextures;
|
||||
public:
|
||||
explicit Application(ApplicationConfig config = {}) noexcept : mConfig(config) {}
|
||||
virtual ~Application() = default;
|
||||
|
||||
[[nodiscard]]
|
||||
const ApplicationConfig& getConfig() const noexcept { return mConfig; }
|
||||
|
||||
[[nodiscard]]
|
||||
mijin::StackedFileSystemAdapter& getFS() { return mFS; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user