处理堆叠顺序

This commit is contained in:
2025-12-22 11:37:18 +08:00
parent dee16344ce
commit 6382afeb03
7 changed files with 68 additions and 0 deletions

View File

@@ -3,9 +3,28 @@
#include <glib.h>
#include <string.h>
#include "client.h"
#include "monitor.h"
#include "types.h"
#include "wm.h"
void focus_client_in_same_tag(const user_action_arg_t *arg) {
bool next = arg->b;
tag_t *tag = wm.current_monitor->selected_tag;
task_in_tag_t *task = nullptr;
if (next) {
task = client_get_next_task_in_tag(wm.client_focused, tag);
} else {
task = client_get_previous_task_in_tag(wm.client_focused, tag);
}
if (!task) return;
client_stack_raise(task->client);
client_focus(task->client);
}
void select_tag_of_current_monitor(const user_action_arg_t *arg) {
monitor_select_tag(wm.current_monitor, arg->ui);
}