[libtaskmanager] Activate window before moving, resizing, minimizing, or maximizing it

wilder-5.24
Alex Rosca 4 years ago committed by Nate Graham
parent 38338042c0
commit 7da22650ec
  1. 31
      libtaskmanager/waylandtasksmodel.cpp

@ -528,12 +528,7 @@ void WaylandTasksModel::requestMove(const QModelIndex &index)
KWayland::Client::PlasmaWindow *window = d->windows.at(index.row()); KWayland::Client::PlasmaWindow *window = d->windows.at(index.row());
const QString &currentDesktop = d->virtualDesktopInfo->currentDesktop().toString(); window->requestActivate();
if (!currentDesktop.isEmpty()) {
window->requestEnterVirtualDesktop(currentDesktop);
}
window->requestMove(); window->requestMove();
} }
@ -545,12 +540,7 @@ void WaylandTasksModel::requestResize(const QModelIndex &index)
KWayland::Client::PlasmaWindow *window = d->windows.at(index.row()); KWayland::Client::PlasmaWindow *window = d->windows.at(index.row());
const QString &currentDesktop = d->virtualDesktopInfo->currentDesktop().toString(); window->requestActivate();
if (!currentDesktop.isEmpty()) {
window->requestEnterVirtualDesktop(currentDesktop);
}
window->requestResize(); window->requestResize();
} }
@ -560,15 +550,7 @@ void WaylandTasksModel::requestToggleMinimized(const QModelIndex &index)
return; return;
} }
KWayland::Client::PlasmaWindow *window = d->windows.at(index.row()); d->windows.at(index.row())->requestToggleMinimized();
const QString &currentDesktop = d->virtualDesktopInfo->currentDesktop().toString();
if (!currentDesktop.isEmpty()) {
window->requestEnterVirtualDesktop(currentDesktop);
}
window->requestToggleMinimized();
} }
void WaylandTasksModel::requestToggleMaximized(const QModelIndex &index) void WaylandTasksModel::requestToggleMaximized(const QModelIndex &index)
@ -579,12 +561,7 @@ void WaylandTasksModel::requestToggleMaximized(const QModelIndex &index)
KWayland::Client::PlasmaWindow *window = d->windows.at(index.row()); KWayland::Client::PlasmaWindow *window = d->windows.at(index.row());
const QString &currentDesktop = d->virtualDesktopInfo->currentDesktop().toString(); window->requestActivate();
if (!currentDesktop.isEmpty()) {
window->requestEnterVirtualDesktop(currentDesktop);
}
window->requestToggleMaximized(); window->requestToggleMaximized();
} }

Loading…
Cancel
Save