添加 monocle 布局功能

This commit is contained in:
2025-12-09 00:41:41 +08:00
parent 5039ce457e
commit 489ae4bf2a
8 changed files with 95 additions and 1 deletions

19
src/layout.c Normal file
View File

@@ -0,0 +1,19 @@
#include "layout.h"
#include <stdint.h>
#include "client.h"
#include "types.h"
#include "utils.h"
void monocle(tag_t *tag) {
logger("== monocle tag: %s start ==\n", tag->name);
for (task_in_tag_t *task = tag->task_list; task; task = task->next) {
if (!client_need_layout(task->client)) continue;
task->geometry = task->client->monitor->workarea;
logger("== window 0x%x: x: %d, y: %d, width: %u, height: %u\n",
task->client->window, task->geometry.x, task->geometry.y,
task->geometry.width, task->geometry.height);
}
logger("== monocle tag: %s end ==\n", tag->name);
}