File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,21 @@ void I3Ipc::handleWorkspaceEvent(I3IpcEvent* event) {
443443 } else {
444444 qCInfo (logi3Ipc) << " Workspace" << name << " has already been deleted" ;
445445 }
446+ } else if (change == " move" || change == " rename" || change == " urgent" ) {
447+ auto name = event->mData [" current" ][" name" ].toString ();
448+
449+ auto * workspace = this ->findWorkspaceByName (name);
450+
451+ if (workspace != nullptr ) {
452+ auto data = event->mData [" current" ].toObject ().toVariantMap ();
453+
454+ workspace->updateFromObject (data);
455+ } else {
456+ qWarning () << " Workspace" << name << " doesn't exist" ;
457+ }
458+ } else if (change == " reload" ) {
459+ qInfo (logi3Ipc) << " Refreshing Workspaces..." ;
460+ this ->refreshWorkspaces ();
446461 }
447462}
448463
@@ -476,7 +491,7 @@ ObjectModel<I3Workspace>* I3Ipc::workspaces() { return &this->mWorkspaces; }
476491QString I3IpcEvent::type () const { return I3IpcEvent::eventToString (this ->mCode ); }
477492QString I3IpcEvent::data () const { return QString::fromUtf8 (this ->mData .toJson ()); }
478493
479- EventCode I3IpcEvent::intToEvent (uint32_t raw) {
494+ EventCode I3IpcEvent::intToEvent (quint32 raw) {
480495 if ((EventCode::WORKSPACE <= raw && raw <= EventCode::OUTPUT)
481496 || (EventCode::RUN_COMMAND <= raw && raw <= EventCode::GET_TREE))
482497 {
You can’t perform that action at this time.
0 commit comments