feat: client 的任务栏标题点击行为根据 client 窗口的遮挡状态进行
- 当点击 client 在任务中的标题时,如果 client 被其他窗口遮挡,则将其显 示出来,否则切换其 minimize 属性 - 新增 rect 模块用于辅助判断 client 的遮挡状态,添加 rect_intersection/rect_subtract/rect_subtract_many 函数 - client 模块新增 client_get_obscured_state 计算 client 窗口被遮挡状态 - action 模块新增 change_client_state_dwim,实现上述的 client 状态切换
This commit is contained in:
@@ -61,6 +61,13 @@ void client_stack_raise(client_t *client);
|
||||
|
||||
bool client_is_visible(client_t *client);
|
||||
|
||||
typedef enum obscured_t {
|
||||
obscured_none,
|
||||
obscured_partially,
|
||||
obscured_fully,
|
||||
} obscured_t;
|
||||
obscured_t client_get_obscured_state(client_t *client, client_t *client_stack);
|
||||
|
||||
static inline uint16_t client_width(client_t *c) {
|
||||
return c->geometry.width + c->border_width * 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user