mirror of https://github.com/hyprwm/Hyprland
Compare commits
3 Commits
4013682bce
...
153c6c72f0
Author | SHA1 | Date |
---|---|---|
|
153c6c72f0 | |
|
ac11771348 | |
|
f2dc48d92f |
|
@ -7,7 +7,9 @@ CWatchdog::~CWatchdog() {
|
||||||
m_bExitThread = true;
|
m_bExitThread = true;
|
||||||
m_bNotified = true;
|
m_bNotified = true;
|
||||||
m_cvWatchdogCondition.notify_all();
|
m_cvWatchdogCondition.notify_all();
|
||||||
m_pWatchdog.reset();
|
|
||||||
|
if (m_pWatchdog && m_pWatchdog->joinable())
|
||||||
|
m_pWatchdog->join();
|
||||||
}
|
}
|
||||||
|
|
||||||
CWatchdog::CWatchdog() {
|
CWatchdog::CWatchdog() {
|
||||||
|
@ -33,8 +35,6 @@ CWatchdog::CWatchdog() {
|
||||||
m_bNotified = false;
|
m_bNotified = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
m_pWatchdog->detach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWatchdog::startWatching() {
|
void CWatchdog::startWatching() {
|
||||||
|
|
|
@ -1040,7 +1040,8 @@ SWorkspaceIDName getWorkspaceToChangeFromArgs(std::string args, PHLWORKSPACE PCU
|
||||||
return getWorkspaceIDNameFromString(args);
|
return getWorkspaceIDNameFromString(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
const SWorkspaceIDName PPREVWS = PCURRENTWORKSPACE->getPrevWorkspaceIDName(args.contains("_per_monitor"));
|
const bool PER_MON = args.contains("_per_monitor");
|
||||||
|
const SWorkspaceIDName PPREVWS = PCURRENTWORKSPACE->getPrevWorkspaceIDName(PER_MON);
|
||||||
// Do nothing if there's no previous workspace, otherwise switch to it.
|
// Do nothing if there's no previous workspace, otherwise switch to it.
|
||||||
if (PPREVWS.id == -1) {
|
if (PPREVWS.id == -1) {
|
||||||
Debug::log(LOG, "No previous workspace to change to");
|
Debug::log(LOG, "No previous workspace to change to");
|
||||||
|
@ -1048,8 +1049,11 @@ SWorkspaceIDName getWorkspaceToChangeFromArgs(std::string args, PHLWORKSPACE PCU
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto ID = PCURRENTWORKSPACE->m_iID;
|
const auto ID = PCURRENTWORKSPACE->m_iID;
|
||||||
if (const auto PWORKSPACETOCHANGETO = g_pCompositor->getWorkspaceByID(PPREVWS.id); PWORKSPACETOCHANGETO)
|
if (const auto PWORKSPACETOCHANGETO = g_pCompositor->getWorkspaceByID(PPREVWS.id); PWORKSPACETOCHANGETO) {
|
||||||
|
if (PER_MON && PCURRENTWORKSPACE->m_iMonitorID != PWORKSPACETOCHANGETO->m_iMonitorID)
|
||||||
|
return {WORKSPACE_NOT_CHANGED, ""};
|
||||||
return {ID, PWORKSPACETOCHANGETO->m_szName};
|
return {ID, PWORKSPACETOCHANGETO->m_szName};
|
||||||
|
}
|
||||||
|
|
||||||
return {ID, PPREVWS.name.empty() ? std::to_string(PPREVWS.id) : PPREVWS.name};
|
return {ID, PPREVWS.name.empty() ? std::to_string(PPREVWS.id) : PPREVWS.name};
|
||||||
}
|
}
|
||||||
|
@ -1678,7 +1682,6 @@ void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||||
|
|
||||||
// get the current workspace
|
// get the current workspace
|
||||||
const auto PCURRENTWORKSPACE = g_pCompositor->m_pLastMonitor->activeWorkspace;
|
const auto PCURRENTWORKSPACE = g_pCompositor->m_pLastMonitor->activeWorkspace;
|
||||||
|
|
||||||
if (!PCURRENTWORKSPACE) {
|
if (!PCURRENTWORKSPACE) {
|
||||||
Debug::log(ERR, "moveCurrentWorkspaceToMonitor invalid workspace!");
|
Debug::log(ERR, "moveCurrentWorkspaceToMonitor invalid workspace!");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
CRenderbuffer::~CRenderbuffer() {
|
CRenderbuffer::~CRenderbuffer() {
|
||||||
if (!g_pCompositor)
|
if (!g_pCompositor || g_pCompositor->m_bIsShuttingDown || !g_pHyprRenderer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pHyprRenderer->makeEGLCurrent();
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
|
|
|
@ -9,7 +9,7 @@ CTexture::CTexture() {
|
||||||
}
|
}
|
||||||
|
|
||||||
CTexture::~CTexture() {
|
CTexture::~CTexture() {
|
||||||
if (m_bNonOwning)
|
if (m_bNonOwning || !g_pCompositor || g_pCompositor->m_bIsShuttingDown || !g_pHyprRenderer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pHyprRenderer->makeEGLCurrent();
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
|
|
Loading…
Reference in New Issue