mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 03:08:11 +09:00
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
diff --git a/src/shell/bar/widgets/taskbar_widget.cpp b/src/shell/bar/widgets/taskbar_widget.cpp
|
|
--- a/src/shell/bar/widgets/taskbar_widget.cpp
|
|
+++ b/src/shell/bar/widgets/taskbar_widget.cpp
|
|
@@ -5,6 +5,7 @@
|
|
#include "compositors/workspace_backend.h"
|
|
#include "config/config_service.h"
|
|
#include "core/deferred_call.h"
|
|
+#include "core/process/process.h"
|
|
#include "i18n/i18n.h"
|
|
#include "render/core/color.h"
|
|
#include "render/core/renderer.h"
|
|
@@ -36,6 +37,18 @@
|
|
|
|
namespace {
|
|
|
|
+ [[nodiscard]] bool launchTaskbarOverview(const std::string& appId) {
|
|
+ constexpr const char* command = "noctalia-taskbar-overview";
|
|
+ if (appId.empty() || !process::commandExists(command)) {
|
|
+ return false;
|
|
+ }
|
|
+ return process::runAsync({
|
|
+ command,
|
|
+ "--app-id",
|
|
+ appId.c_str(),
|
|
+ });
|
|
+ }
|
|
+
|
|
// Integer centering; optional odd spare pixel on the end side (right/bottom).
|
|
[[nodiscard]] float centeredOffset(float extent, float content, float inset = 0.0F, bool oddSpareOnEnd = true) {
|
|
const float inner = std::max(0.0F, extent - inset * 2.0F);
|
|
@@ -373,6 +386,12 @@ void TaskbarWidget::activateOrLaunchPinned(const TaskModel& task) {
|
|
return;
|
|
}
|
|
|
|
+ const std::string overviewAppId =
|
|
+ !task.appId.empty() ? task.appId : (!task.desktopEntryId.empty() ? task.desktopEntryId : task.idLower);
|
|
+ if (launchTaskbarOverview(overviewAppId)) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
const std::string cycleKey = !task.desktopEntryId.empty() ? task.desktopEntryId : task.idLower;
|
|
std::size_t& cursor = m_groupedAppCycleCursor[cycleKey];
|
|
if (cursor >= windows.size()) {
|