keybinds: unify changeworkspace dispatcher (#3250)

* refactor: changeworkspace dispatcher

* refactor: remove redundant focusWindow calls

* refactor(changeworkspace): warp cursor to middle of last focused window

* refactor: use rememberPrevWorkspace

* Fix: `CWorkspace::rememberPreWorkspace` condition is illogical
This commit is contained in:
memchr 2023-09-11 14:14:43 +00:00 committed by GitHub
parent 5a6d0e9963
commit df51c45d7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 60 deletions

View file

@ -152,7 +152,7 @@ void CWorkspace::rememberPrevWorkspace(const CWorkspace* prev) {
return;
}
if (prev->m_sPrevWorkspace.iID == m_sPrevWorkspace.iID) {
if (prev->m_iID == m_iID) {
Debug::log(LOG, "Tried to set prev workspace to the same as current one");
return;
}