File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,16 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) {
164164 WORKSPACEID id = next ? Desktop::focusState ()->monitor ()->activeWorkspaceID () : 0 ;
165165 while (++id < LONG_MAX) {
166166 const auto PWORKSPACE = g_pCompositor->getWorkspaceByID (id);
167- if (!invalidWSes.contains (id) && (!PWORKSPACE || PWORKSPACE->getWindows () == 0 )) {
168- result.id = id;
169- return result;
167+ if (invalidWSes.contains (id))
168+ continue ;
169+ if (PWORKSPACE) {
170+ if (PWORKSPACE->getWindows ())
171+ continue ;
172+ if (same_mon && PWORKSPACE->m_monitor && PWORKSPACE->m_monitor ->m_id != g_pCompositor->m_lastMonitor ->m_id )
173+ continue ;
170174 }
175+ result.id = id;
176+ return result;
171177 }
172178 } else if (in.starts_with (" prev" )) {
173179 if (!Desktop::focusState ()->monitor ())
You can’t perform that action at this time.
0 commit comments