windowrules: minor fixes to onworkspace

fixes #4227
This commit is contained in:
Vaxry 2023-12-23 15:49:42 +01:00
parent 6c8e0f9863
commit cc0516a9ae
3 changed files with 4 additions and 4 deletions

View file

@ -487,8 +487,6 @@ void CWindow::onMap() {
"CWindow"); "CWindow");
m_vReportedSize = m_vPendingReportedSize; m_vReportedSize = m_vPendingReportedSize;
g_pCompositor->updateWorkspaceWindows(m_iWorkspaceID);
} }
void CWindow::onBorderAngleAnimEnd(void* ptr) { void CWindow::onBorderAngleAnimEnd(void* ptr) {

View file

@ -1038,9 +1038,9 @@ void CConfigManager::handleWindowRuleV2(const std::string& command, const std::s
// find workspacepos that isn't onworkspacepos // find workspacepos that isn't onworkspacepos
size_t WORKSPACEPOS = std::string::npos; size_t WORKSPACEPOS = std::string::npos;
size_t currentPos = 0; size_t currentPos = VALUE.find("workspace:");
while (currentPos != std::string::npos) { while (currentPos != std::string::npos) {
if (currentPos > 0 && VALUE[currentPos - 1] != 'n') { if (currentPos == 0 || VALUE[currentPos - 1] != 'n') {
WORKSPACEPOS = currentPos; WORKSPACEPOS = currentPos;
break; break;
} }

View file

@ -643,6 +643,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
// fix some xwayland apps that don't behave nicely // fix some xwayland apps that don't behave nicely
PWINDOW->m_vReportedSize = PWINDOW->m_vPendingReportedSize; PWINDOW->m_vReportedSize = PWINDOW->m_vPendingReportedSize;
g_pCompositor->updateWorkspaceWindows(PWINDOW->m_iWorkspaceID);
} }
void Events::listener_unmapWindow(void* owner, void* data) { void Events::listener_unmapWindow(void* owner, void* data) {