添加布局算法并在新建窗口时应用规则
This commit is contained in:
@@ -19,7 +19,7 @@ struct monitor_t {
|
||||
int32_t monitor_x, monitor_y, window_x, window_y;
|
||||
uint32_t monitor_width, monitor_height, window_width, window_height;
|
||||
|
||||
uint32_t selected_tag;
|
||||
uint32_t selected_tags;
|
||||
char **tags;
|
||||
|
||||
/* 为了避免引入 cairo 相关头文件,这里用 void *
|
||||
@@ -65,8 +65,8 @@ typedef struct rule_t {
|
||||
/* 规则适用的屏幕总数,若设置为 0 ,则此条规则适用于任意屏幕数 */
|
||||
const uint32_t monitor_amount;
|
||||
|
||||
uint32_t tags;
|
||||
uint32_t monitor_index;
|
||||
uint32_t tags; /* tags 必须设置为大于 0 才是有效设置 */
|
||||
uint32_t monitor_index; /* 仅当 tags 为有效设置时该设置才生效 */
|
||||
|
||||
bool switch_to_tag;
|
||||
bool fullscreen;
|
||||
|
||||
@@ -24,6 +24,13 @@ xcb_window_t get_root_window(void);
|
||||
bool get_window_visible(xcb_window_t window);
|
||||
xcb_window_t get_transient_window_for(xcb_window_t window);
|
||||
|
||||
typedef struct window_class_instance_t {
|
||||
char class[128];
|
||||
char instance[128];
|
||||
} window_class_instance_t;
|
||||
void get_window_class_instance(xcb_window_t window,
|
||||
window_class_instance_t *class_instance);
|
||||
|
||||
typedef struct window_geometry_t {
|
||||
int32_t x, y;
|
||||
uint32_t width, height, border_width;
|
||||
|
||||
Reference in New Issue
Block a user