mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35: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
|
||||
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!");
|
||||
|
||||
int lazyUpdateCounter = 0;
|
||||
|
||||
// setup the tray so apps send to us
|
||||
if (!STATUSBAR.getIsDestroyed())
|
||||
STATUSBAR.setupTray();
|
||||
|
||||
while (1) {
|
||||
|
|
|
@ -55,6 +55,9 @@ NONMOVABLE NONCOPYABLE struct SBarModule {
|
|||
|
||||
class CStatusBar {
|
||||
public:
|
||||
CStatusBar() {
|
||||
m_bIsDestroyed = true;
|
||||
}
|
||||
|
||||
EXPOSED_MEMBER(WindowID, xcb_window_t, i);
|
||||
EXPOSED_MEMBER(MonitorID, int, i);
|
||||
|
@ -63,6 +66,7 @@ public:
|
|||
EXPOSED_MEMBER(LastWindowClass, std::string, sz);
|
||||
EXPOSED_MEMBER(IsCovered, bool, b);
|
||||
EXPOSED_MEMBER(HasTray, bool, b);
|
||||
EXPOSED_MEMBER(IsDestroyed, bool, b); // for not deleting nulls
|
||||
|
||||
void draw();
|
||||
void setup(int MonitorID);
|
||||
|
@ -81,8 +85,6 @@ public:
|
|||
xcb_window_t trayWindowID = 0;
|
||||
|
||||
private:
|
||||
// for not deleting nulls
|
||||
bool m_bIsDestroyed = true;
|
||||
|
||||
Vector2D m_vecSize;
|
||||
Vector2D m_vecPosition;
|
||||
|
|
Loading…
Reference in a new issue