mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
fix rare crash in the bar
This commit is contained in:
parent
1fd1e09dbc
commit
029c66b2bc
2 changed files with 3 additions and 3 deletions
|
@ -134,7 +134,7 @@ void CStatusBar::draw() {
|
|||
|
||||
const auto WORKSPACE = g_pWindowManager->getWorkspaceByID(g_pWindowManager->activeWorkspaces[m_iMonitorID]);
|
||||
|
||||
if (WORKSPACE->getHasFullscreenWindow()) // TODO: fix this
|
||||
if (!WORKSPACE || WORKSPACE->getHasFullscreenWindow()) // TODO: fix this
|
||||
return; // Do not draw a bar on a fullscreen window.
|
||||
|
||||
xcb_rectangle_t rectangles[] = {{(int)0, (int)0, (int)m_vecSize.x, (int)m_vecSize.y}};
|
||||
|
|
|
@ -130,11 +130,11 @@ void CWindowManager::setupRandrMonitors() {
|
|||
void CWindowManager::setupManager() {
|
||||
setupRandrMonitors();
|
||||
|
||||
if (monitors.size() == 0) {
|
||||
if (1 || monitors.size() == 0) {
|
||||
// RandR failed!
|
||||
Debug::log(WARN, "RandR failed!");
|
||||
|
||||
#define TESTING_MON_AMOUNT 1
|
||||
#define TESTING_MON_AMOUNT 3
|
||||
for (int i = 0; i < TESTING_MON_AMOUNT /* Testing on 3 monitors, RandR shouldnt fail on a real desktop */; ++i) {
|
||||
monitors.push_back(SMonitor());
|
||||
monitors[i].vecPosition = Vector2D(i * Screen->width_in_pixels / TESTING_MON_AMOUNT, 0);
|
||||
|
|
Loading…
Reference in a new issue