mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
hyprland/ipc: prefer ID based workspace lookups to name based ones
Should (hopefully) reduce race condition issues.
This commit is contained in:
parent
d3b1a65911
commit
fb343ab639
3 changed files with 26 additions and 12 deletions
|
|
@ -35,6 +35,7 @@ void HyprlandWorkspace::updateInitial(qint32 id, QString name) {
|
|||
}
|
||||
|
||||
void HyprlandWorkspace::updateFromObject(QVariantMap object) {
|
||||
auto name = object.value("name").value<QString>();
|
||||
auto monitorId = object.value("monitorID").value<qint32>();
|
||||
auto monitorName = object.value("monitor").value<QString>();
|
||||
|
||||
|
|
@ -48,8 +49,8 @@ void HyprlandWorkspace::updateFromObject(QVariantMap object) {
|
|||
|
||||
// No events we currently handle give a workspace id but not a name,
|
||||
// so we shouldn't set this if it isn't an initial query
|
||||
if (initial) {
|
||||
this->mName = object.value("name").value<QString>();
|
||||
if (initial && name != this->mName) {
|
||||
this->mName = name;
|
||||
emit this->nameChanged();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue