处理 clientmessage 事件和全屏窗口

This commit is contained in:
2025-08-26 00:42:19 +08:00
parent b28c9cd58b
commit f225dc7011
8 changed files with 104 additions and 7 deletions

View File

@@ -22,12 +22,23 @@ void maximize_client(client_t *c) {
c->height = m->window_height - 2 * c->border_width;
}
/**
* @brief 设置全屏窗口的几何属性
*/
void fullscreen_client(client_t *c) {
if (c->floating) {
c->old_x = c->x;
c->old_y = c->y;
c->old_width = c->width;
c->old_height = c->height;
}
monitor_t *m = c->monitor;
c->x = m->monitor_x;
c->y = m->monitor_y;
c->width = m->monitor_width - 2 * c->border_width;
c->height = m->monitor_height - 2 * c->border_width;
c->width = m->monitor_width;
c->height = m->monitor_height;
c->old_border_width = c->border_width;
c->border_width = 0;
}
void monocle(monitor_t *monitor) {