mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-02 14:55:57 +01:00
fixed #35
This commit is contained in:
parent
249c433c66
commit
36fdcc89b3
2 changed files with 10 additions and 4 deletions
|
@ -83,13 +83,17 @@ int64_t barMainThread() {
|
||||||
// Init config manager
|
// Init config manager
|
||||||
ConfigManager::init();
|
ConfigManager::init();
|
||||||
|
|
||||||
STATUSBAR.setup(0);
|
if (ConfigManager::getInt("bar:enabled") == 1) {
|
||||||
|
Debug::log(LOG, "Bar enabled, reload config to launch it.");
|
||||||
|
ConfigManager::loadConfigLoadVars();
|
||||||
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "Bar setup finished!");
|
Debug::log(LOG, "Bar setup finished!");
|
||||||
|
|
||||||
int lazyUpdateCounter = 0;
|
int lazyUpdateCounter = 0;
|
||||||
|
|
||||||
// setup the tray so apps send to us
|
// setup the tray so apps send to us
|
||||||
|
if (!STATUSBAR.getIsDestroyed())
|
||||||
STATUSBAR.setupTray();
|
STATUSBAR.setupTray();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -55,6 +55,9 @@ NONMOVABLE NONCOPYABLE struct SBarModule {
|
||||||
|
|
||||||
class CStatusBar {
|
class CStatusBar {
|
||||||
public:
|
public:
|
||||||
|
CStatusBar() {
|
||||||
|
m_bIsDestroyed = true;
|
||||||
|
}
|
||||||
|
|
||||||
EXPOSED_MEMBER(WindowID, xcb_window_t, i);
|
EXPOSED_MEMBER(WindowID, xcb_window_t, i);
|
||||||
EXPOSED_MEMBER(MonitorID, int, i);
|
EXPOSED_MEMBER(MonitorID, int, i);
|
||||||
|
@ -63,6 +66,7 @@ public:
|
||||||
EXPOSED_MEMBER(LastWindowClass, std::string, sz);
|
EXPOSED_MEMBER(LastWindowClass, std::string, sz);
|
||||||
EXPOSED_MEMBER(IsCovered, bool, b);
|
EXPOSED_MEMBER(IsCovered, bool, b);
|
||||||
EXPOSED_MEMBER(HasTray, bool, b);
|
EXPOSED_MEMBER(HasTray, bool, b);
|
||||||
|
EXPOSED_MEMBER(IsDestroyed, bool, b); // for not deleting nulls
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
void setup(int MonitorID);
|
void setup(int MonitorID);
|
||||||
|
@ -81,8 +85,6 @@ public:
|
||||||
xcb_window_t trayWindowID = 0;
|
xcb_window_t trayWindowID = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// for not deleting nulls
|
|
||||||
bool m_bIsDestroyed = true;
|
|
||||||
|
|
||||||
Vector2D m_vecSize;
|
Vector2D m_vecSize;
|
||||||
Vector2D m_vecPosition;
|
Vector2D m_vecPosition;
|
||||||
|
|
Loading…
Reference in a new issue