Skip to content

Commit

Permalink
initialize m_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
earboxer committed Jan 19, 2025
1 parent 02237c6 commit 380912b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xwayland/XWayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "../helpers/fs/FsUtils.hpp"

CXWayland::CXWayland(const bool wantsEnabled) {
m_enabled = false;
#ifndef NO_XWAYLAND
// Disable Xwayland and clean up if the user disabled it.
if (!wantsEnabled) {
Expand All @@ -15,6 +14,7 @@ CXWayland::CXWayland(const bool wantsEnabled) {
g_pCompositor->closeWindow(w);
}
unsetenv("DISPLAY");
m_enabled = false;
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/xwayland/XWayland.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CXWayland {
} events;

private:
bool m_enabled;
bool m_enabled = false;
};

inline std::unique_ptr<CXWayland> g_pXWayland;
Expand Down

0 comments on commit 380912b

Please sign in to comment.