fix: dont use evenmask

This commit is contained in:
DreamMaoMao
2025-12-03 17:22:19 +08:00
parent 5c314be8c6
commit e965264f3b
4 changed files with 92 additions and 178 deletions

View File

@@ -3277,6 +3277,6 @@ void reset_option(void) {
int reload_config(const Arg *arg) { int reload_config(const Arg *arg) {
parse_config(); parse_config();
reset_option(); reset_option();
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }

View File

@@ -503,7 +503,7 @@ int setlayout(const Arg *arg) {
selmon->pertag->ltidxs[selmon->pertag->curtag] = &layouts[jk]; selmon->pertag->ltidxs[selmon->pertag->curtag] = &layouts[jk];
clear_fullscreen_and_maximized_state(selmon); clear_fullscreen_and_maximized_state(selmon);
arrange(selmon, false); arrange(selmon, false);
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }
} }
@@ -517,7 +517,7 @@ int setkeymode(const Arg *arg) {
} else { } else {
keymode.isdefault = false; keymode.isdefault = false;
} }
printstatus(PRINT_KEYMODE); printstatus();
return 1; return 1;
} }
@@ -866,7 +866,7 @@ int switch_keyboard_layout(const Arg *arg) {
wlr_seat_keyboard_notify_modifiers(seat, &tkb->modifiers); wlr_seat_keyboard_notify_modifiers(seat, &tkb->modifiers);
} }
printstatus(PRINT_KB_LAYOUT); printstatus();
return 0; return 0;
} }
@@ -907,7 +907,7 @@ int switch_layout(const Arg *arg) {
} }
clear_fullscreen_and_maximized_state(selmon); clear_fullscreen_and_maximized_state(selmon);
arrange(selmon, false); arrange(selmon, false);
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }
@@ -918,7 +918,7 @@ int switch_layout(const Arg *arg) {
jk == LENGTH(layouts) - 1 ? &layouts[0] : &layouts[jk + 1]; jk == LENGTH(layouts) - 1 ? &layouts[0] : &layouts[jk + 1];
clear_fullscreen_and_maximized_state(selmon); clear_fullscreen_and_maximized_state(selmon);
arrange(selmon, false); arrange(selmon, false);
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }
} }
@@ -1260,7 +1260,7 @@ int toggletag(const Arg *arg) {
focusclient(focustop(selmon), 1); focusclient(focustop(selmon), 1);
arrange(selmon, false); arrange(selmon, false);
} }
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }
@@ -1278,7 +1278,7 @@ int toggleview(const Arg *arg) {
focusclient(focustop(selmon), 1); focusclient(focustop(selmon), 1);
arrange(selmon, false); arrange(selmon, false);
} }
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }
@@ -1396,7 +1396,7 @@ int comboview(const Arg *arg) {
view(&(Arg){.ui = newtags}, false); view(&(Arg){.ui = newtags}, false);
} }
printstatus(PRINT_ALL); printstatus();
return 0; return 0;
} }

View File

@@ -9,9 +9,8 @@ static void dwl_ipc_manager_get_output(struct wl_client *client,
static void dwl_ipc_manager_release(struct wl_client *client, static void dwl_ipc_manager_release(struct wl_client *client,
struct wl_resource *resource); struct wl_resource *resource);
static void dwl_ipc_output_destroy(struct wl_resource *resource); static void dwl_ipc_output_destroy(struct wl_resource *resource);
static void dwl_ipc_output_printstatus(Monitor *monitor, uint32_t event_mask); static void dwl_ipc_output_printstatus(Monitor *monitor);
static void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output, static void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output);
uint32_t event_mask);
static void dwl_ipc_output_set_client_tags(struct wl_client *client, static void dwl_ipc_output_set_client_tags(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *resource,
uint32_t and_tags, uint32_t and_tags,
@@ -86,7 +85,7 @@ void dwl_ipc_manager_get_output(struct wl_client *client,
wl_resource_set_implementation(output_resource, &dwl_output_implementation, wl_resource_set_implementation(output_resource, &dwl_output_implementation,
ipc_output, dwl_ipc_output_destroy); ipc_output, dwl_ipc_output_destroy);
wl_list_insert(&monitor->dwl_ipc_outputs, &ipc_output->link); wl_list_insert(&monitor->dwl_ipc_outputs, &ipc_output->link);
dwl_ipc_output_printstatus_to(ipc_output, PRINT_ALL); dwl_ipc_output_printstatus_to(ipc_output);
} }
void dwl_ipc_manager_release(struct wl_client *client, void dwl_ipc_manager_release(struct wl_client *client,
@@ -101,15 +100,14 @@ static void dwl_ipc_output_destroy(struct wl_resource *resource) {
} }
// 修改IPC输出函数接受掩码参数 // 修改IPC输出函数接受掩码参数
void dwl_ipc_output_printstatus(Monitor *monitor, uint32_t event_mask) { void dwl_ipc_output_printstatus(Monitor *monitor) {
DwlIpcOutput *ipc_output; DwlIpcOutput *ipc_output;
wl_list_for_each(ipc_output, &monitor->dwl_ipc_outputs, link) wl_list_for_each(ipc_output, &monitor->dwl_ipc_outputs, link)
dwl_ipc_output_printstatus_to(ipc_output, event_mask); dwl_ipc_output_printstatus_to(ipc_output);
} }
// 修改主IPC输出函数根据掩码发送相应事件 // 修改主IPC输出函数根据掩码发送相应事件
void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output, void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) {
uint32_t event_mask) {
Monitor *monitor = ipc_output->mon; Monitor *monitor = ipc_output->mon;
Client *c = NULL, *focused = NULL; Client *c = NULL, *focused = NULL;
struct wlr_keyboard *keyboard; struct wlr_keyboard *keyboard;
@@ -117,28 +115,14 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output,
int tagmask, state, numclients, focused_client, tag; int tagmask, state, numclients, focused_client, tag;
const char *title, *appid, *symbol; const char *title, *appid, *symbol;
char kb_layout[32]; char kb_layout[32];
// 只在需要时才获取这些数据
if (event_mask & (PRINT_ACTIVE | PRINT_TAG | PRINT_TITLE | PRINT_APPID |
PRINT_FULLSCREEN | PRINT_FLOATING | PRINT_X | PRINT_Y |
PRINT_WIDTH | PRINT_HEIGHT)) {
focused = focustop(monitor); focused = focustop(monitor);
}
// 发送活动状态
if (event_mask & PRINT_ACTIVE) {
zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon); zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon);
}
// 发送标签状态
if (event_mask & PRINT_TAG) {
for (tag = 0; tag < LENGTH(tags); tag++) { for (tag = 0; tag < LENGTH(tags); tag++) {
numclients = state = focused_client = 0; numclients = state = focused_client = 0;
tagmask = 1 << tag; tagmask = 1 << tag;
if ((tagmask & monitor->tagset[monitor->seltags]) != 0) if ((tagmask & monitor->tagset[monitor->seltags]) != 0)
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE;
if (focused) {
wl_list_for_each(c, &clients, link) { wl_list_for_each(c, &clients, link) {
if (c->mon != monitor) if (c->mon != monitor)
continue; continue;
@@ -150,143 +134,85 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output,
state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT;
numclients++; numclients++;
} }
}
zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state,
numclients, focused_client); numclients, focused_client);
} }
}
// 只在需要时才获取标题和应用ID
if (event_mask & (PRINT_TITLE | PRINT_APPID)) {
title = focused ? client_get_title(focused) : ""; title = focused ? client_get_title(focused) : "";
appid = focused ? client_get_appid(focused) : ""; appid = focused ? client_get_appid(focused) : "";
}
// 获取布局符号
if (event_mask & PRINT_LAYOUT_SYMBOL) {
if (monitor->isoverview) { if (monitor->isoverview) {
symbol = overviewlayout.symbol; symbol = overviewlayout.symbol;
} else { } else {
symbol = monitor->pertag->ltidxs[monitor->pertag->curtag]->symbol; symbol = monitor->pertag->ltidxs[monitor->pertag->curtag]->symbol;
} }
}
// 发送布局索引
if (event_mask & PRINT_LAYOUT) {
zdwl_ipc_output_v2_send_layout(
ipc_output->resource,
monitor->pertag->ltidxs[monitor->pertag->curtag] - layouts);
}
// 发送标题
if (event_mask & PRINT_TITLE) {
zdwl_ipc_output_v2_send_title(ipc_output->resource,
title ? title : broken);
}
// 发送应用ID
if (event_mask & PRINT_APPID) {
zdwl_ipc_output_v2_send_appid(ipc_output->resource,
appid ? appid : broken);
}
// 发送布局符号
if (event_mask & PRINT_LAYOUT_SYMBOL) {
zdwl_ipc_output_v2_send_layout_symbol(ipc_output->resource, symbol);
}
// 发送全屏状态
if ((event_mask & PRINT_FULLSCREEN) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION) {
zdwl_ipc_output_v2_send_fullscreen(ipc_output->resource,
focused ? focused->isfullscreen : 0);
}
// 发送浮动状态
if ((event_mask & PRINT_FLOATING) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION) {
zdwl_ipc_output_v2_send_floating(ipc_output->resource,
focused ? focused->isfloating : 0);
}
// 发送X坐标
if ((event_mask & PRINT_X) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_X_SINCE_VERSION) {
zdwl_ipc_output_v2_send_x(ipc_output->resource,
focused ? focused->geom.x : 0);
}
// 发送Y坐标
if ((event_mask & PRINT_Y) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_Y_SINCE_VERSION) {
zdwl_ipc_output_v2_send_y(ipc_output->resource,
focused ? focused->geom.y : 0);
}
// 发送宽度
if ((event_mask & PRINT_WIDTH) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_WIDTH_SINCE_VERSION) {
zdwl_ipc_output_v2_send_width(ipc_output->resource,
focused ? focused->geom.width : 0);
}
// 发送高度
if ((event_mask & PRINT_HEIGHT) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_HEIGHT_SINCE_VERSION) {
zdwl_ipc_output_v2_send_height(ipc_output->resource,
focused ? focused->geom.height : 0);
}
// 发送最后图层
if ((event_mask & PRINT_LAST_LAYER) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_LAST_LAYER_SINCE_VERSION) {
zdwl_ipc_output_v2_send_last_layer(ipc_output->resource,
monitor->last_surface_ws_name);
}
// 获取键盘布局(只在需要时)
if (event_mask & PRINT_KB_LAYOUT) {
keyboard = &kb_group->wlr_group->keyboard; keyboard = &kb_group->wlr_group->keyboard;
current = xkb_state_serialize_layout(keyboard->xkb_state, current = xkb_state_serialize_layout(keyboard->xkb_state,
XKB_STATE_LAYOUT_EFFECTIVE); XKB_STATE_LAYOUT_EFFECTIVE);
get_layout_abbr(kb_layout, get_layout_abbr(kb_layout,
xkb_keymap_layout_get_name(keyboard->keymap, current)); xkb_keymap_layout_get_name(keyboard->keymap, current));
zdwl_ipc_output_v2_send_layout(
ipc_output->resource,
monitor->pertag->ltidxs[monitor->pertag->curtag] - layouts);
zdwl_ipc_output_v2_send_title(ipc_output->resource, title ? title : broken);
zdwl_ipc_output_v2_send_appid(ipc_output->resource, appid ? appid : broken);
zdwl_ipc_output_v2_send_layout_symbol(ipc_output->resource, symbol);
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION) {
zdwl_ipc_output_v2_send_fullscreen(ipc_output->resource,
focused ? focused->isfullscreen : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION) {
zdwl_ipc_output_v2_send_floating(ipc_output->resource,
focused ? focused->isfloating : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_X_SINCE_VERSION) {
zdwl_ipc_output_v2_send_x(ipc_output->resource,
focused ? focused->geom.x : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_Y_SINCE_VERSION) {
zdwl_ipc_output_v2_send_y(ipc_output->resource,
focused ? focused->geom.y : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_WIDTH_SINCE_VERSION) {
zdwl_ipc_output_v2_send_width(ipc_output->resource,
focused ? focused->geom.width : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_HEIGHT_SINCE_VERSION) {
zdwl_ipc_output_v2_send_height(ipc_output->resource,
focused ? focused->geom.height : 0);
}
if (wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_LAST_LAYER_SINCE_VERSION) {
zdwl_ipc_output_v2_send_last_layer(ipc_output->resource,
monitor->last_surface_ws_name);
} }
// 发送键盘布局 if (wl_resource_get_version(ipc_output->resource) >=
if ((event_mask & PRINT_KB_LAYOUT) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_KB_LAYOUT_SINCE_VERSION) { ZDWL_IPC_OUTPUT_V2_KB_LAYOUT_SINCE_VERSION) {
zdwl_ipc_output_v2_send_kb_layout(ipc_output->resource, kb_layout); zdwl_ipc_output_v2_send_kb_layout(ipc_output->resource, kb_layout);
} }
// 发送键模式 if (wl_resource_get_version(ipc_output->resource) >=
if ((event_mask & PRINT_KEYMODE) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_KEYMODE_SINCE_VERSION) { ZDWL_IPC_OUTPUT_V2_KEYMODE_SINCE_VERSION) {
zdwl_ipc_output_v2_send_keymode(ipc_output->resource, keymode.mode); zdwl_ipc_output_v2_send_keymode(ipc_output->resource, keymode.mode);
} }
// 发送缩放因子 if (wl_resource_get_version(ipc_output->resource) >=
if ((event_mask & PRINT_SCALEFACTOR) &&
wl_resource_get_version(ipc_output->resource) >=
ZDWL_IPC_OUTPUT_V2_SCALEFACTOR_SINCE_VERSION) { ZDWL_IPC_OUTPUT_V2_SCALEFACTOR_SINCE_VERSION) {
zdwl_ipc_output_v2_send_scalefactor(ipc_output->resource, zdwl_ipc_output_v2_send_scalefactor(ipc_output->resource,
monitor->wlr_output->scale * 100); monitor->wlr_output->scale * 100);
} }
// 发送帧结束标记
if (event_mask & PRINT_FRAME) {
zdwl_ipc_output_v2_send_frame(ipc_output->resource); zdwl_ipc_output_v2_send_frame(ipc_output->resource);
} }
}
void dwl_ipc_output_set_client_tags(struct wl_client *client, void dwl_ipc_output_set_client_tags(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *resource,
@@ -313,7 +239,7 @@ void dwl_ipc_output_set_client_tags(struct wl_client *client,
if (selmon == monitor) if (selmon == monitor)
focusclient(focustop(monitor), 1); focusclient(focustop(monitor), 1);
arrange(selmon, false); arrange(selmon, false);
printstatus(PRINT_ALL); printstatus();
} }
void dwl_ipc_output_set_layout(struct wl_client *client, void dwl_ipc_output_set_layout(struct wl_client *client,
@@ -332,7 +258,7 @@ void dwl_ipc_output_set_layout(struct wl_client *client,
monitor->pertag->ltidxs[monitor->pertag->curtag] = &layouts[index]; monitor->pertag->ltidxs[monitor->pertag->curtag] = &layouts[index];
clear_fullscreen_and_maximized_state(monitor); clear_fullscreen_and_maximized_state(monitor);
arrange(monitor, false); arrange(monitor, false);
printstatus(PRINT_ALL); printstatus();
} }
void dwl_ipc_output_set_tags(struct wl_client *client, void dwl_ipc_output_set_tags(struct wl_client *client,

View File

@@ -629,7 +629,7 @@ static void outputmgrapplyortest(struct wlr_output_configuration_v1 *config,
static void outputmgrtest(struct wl_listener *listener, void *data); static void outputmgrtest(struct wl_listener *listener, void *data);
static void pointerfocus(Client *c, struct wlr_surface *surface, double sx, static void pointerfocus(Client *c, struct wlr_surface *surface, double sx,
double sy, uint32_t time); double sy, uint32_t time);
static void printstatus(uint32_t event_mask); static void printstatus(void);
static void quitsignal(int signo); static void quitsignal(int signo);
static void powermgrsetmode(struct wl_listener *listener, void *data); static void powermgrsetmode(struct wl_listener *listener, void *data);
static void rendermon(struct wl_listener *listener, void *data); static void rendermon(struct wl_listener *listener, void *data);
@@ -2168,7 +2168,7 @@ void closemon(Monitor *m) {
} }
if (selmon) { if (selmon) {
focusclient(focustop(selmon), 1); focusclient(focustop(selmon), 1);
printstatus(PRINT_ALL); printstatus();
} }
} }
@@ -2802,7 +2802,7 @@ void createmon(struct wl_listener *listener, void *data) {
add_workspace_by_tag(i, m); add_workspace_by_tag(i, m);
} }
printstatus(PRINT_ALL); printstatus();
} }
void // fix for 0.5 void // fix for 0.5
@@ -3258,7 +3258,7 @@ void focusclient(Client *c, int lift) {
client_activate_surface(old_keyboard_focus_surface, 0); client_activate_surface(old_keyboard_focus_surface, 0);
} }
} }
printstatus(PRINT_ALL); printstatus();
if (!c) { if (!c) {
@@ -3808,7 +3808,7 @@ mapnotify(struct wl_listener *listener, void *data) {
// make sure the animation is open type // make sure the animation is open type
c->is_pending_open_animation = true; c->is_pending_open_animation = true;
resize(c, c->geom, 0); resize(c, c->geom, 0);
printstatus(PRINT_ALL); printstatus();
} }
void maximizenotify(struct wl_listener *listener, void *data) { void maximizenotify(struct wl_listener *listener, void *data) {
@@ -4147,9 +4147,7 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
} }
// 修改printstatus函数接受掩码参数 // 修改printstatus函数接受掩码参数
void printstatus(uint32_t event_mask) { void printstatus(void) { wl_signal_emit(&mango_print_status, NULL); }
wl_signal_emit(&mango_print_status, (void *)(uintptr_t)event_mask);
}
void powermgrsetmode(struct wl_listener *listener, void *data) { void powermgrsetmode(struct wl_listener *listener, void *data) {
struct wlr_output_power_v1_set_mode_event *event = data; struct wlr_output_power_v1_set_mode_event *event = data;
@@ -4406,7 +4404,7 @@ run(char *startup_cmd) {
if (fd_set_nonblock(STDOUT_FILENO) < 0) if (fd_set_nonblock(STDOUT_FILENO) < 0)
close(STDOUT_FILENO); close(STDOUT_FILENO);
printstatus(PRINT_ALL); printstatus();
/* At this point the outputs are initialized, choose initial selmon /* At this point the outputs are initialized, choose initial selmon
* based on cursor position, and set default cursor image */ * based on cursor position, and set default cursor image */
@@ -4541,7 +4539,7 @@ setfloating(Client *c, int floating) {
arrange(c->mon, false); arrange(c->mon, false);
setborder_color(c); setborder_color(c);
printstatus(PRINT_ALL); printstatus();
} }
void reset_maximizescreen_size(Client *c) { void reset_maximizescreen_size(Client *c) {
@@ -4872,24 +4870,14 @@ void create_output(struct wlr_backend *backend, void *data) {
// 修改信号处理函数,接收掩码参数 // 修改信号处理函数,接收掩码参数
void handle_print_status(struct wl_listener *listener, void *data) { void handle_print_status(struct wl_listener *listener, void *data) {
uint32_t event_mask = (uintptr_t)data;
// 如果传入的是NULL旧代码或0使用默认的所有事件
if (!event_mask) {
event_mask = PRINT_ALL;
}
Monitor *m = NULL; Monitor *m = NULL;
wl_list_for_each(m, &mons, link) { wl_list_for_each(m, &mons, link) {
if (!m->wlr_output->enabled) { if (!m->wlr_output->enabled) {
continue; continue;
} }
// 更新workspace状态根据掩码决定是否更新
if (event_mask & PRINT_TAG || event_mask & PRINT_ACTIVE) {
dwl_ext_workspace_printstatus(m); dwl_ext_workspace_printstatus(m);
}
// 更新IPC输出状态传入掩码 dwl_ipc_output_printstatus(m);
dwl_ipc_output_printstatus(m, event_mask);
} }
} }
@@ -5226,7 +5214,7 @@ void tag_client(const Arg *arg, Client *target_client) {
} }
focusclient(target_client, 1); focusclient(target_client, 1);
printstatus(PRINT_ALL); printstatus();
} }
void overview(Monitor *m) { grid(m); } void overview(Monitor *m) { grid(m); }
@@ -5434,7 +5422,7 @@ void unmapnotify(struct wl_listener *listener, void *data) {
} }
wlr_scene_node_destroy(&c->scene->node); wlr_scene_node_destroy(&c->scene->node);
printstatus(PRINT_ALL); printstatus();
motionnotify(0, NULL, 0, 0, 0, 0); motionnotify(0, NULL, 0, 0, 0, 0);
} }
@@ -5582,7 +5570,7 @@ void updatetitle(struct wl_listener *listener, void *data) {
if (title && c->foreign_toplevel) if (title && c->foreign_toplevel)
wlr_foreign_toplevel_handle_v1_set_title(c->foreign_toplevel, title); wlr_foreign_toplevel_handle_v1_set_title(c->foreign_toplevel, title);
if (c == focustop(c->mon)) if (c == focustop(c->mon))
printstatus(PRINT_TITLE); printstatus();
} }
void // 17 fix to 0.5 void // 17 fix to 0.5
@@ -5602,7 +5590,7 @@ urgent(struct wl_listener *listener, void *data) {
c->isurgent = 1; c->isurgent = 1;
if (client_surface(c)->mapped) if (client_surface(c)->mapped)
setborder_color(c); setborder_color(c);
printstatus(PRINT_ALL); printstatus();
} }
} }
@@ -5657,7 +5645,7 @@ toggleseltags:
if (changefocus) if (changefocus)
focusclient(focustop(m), 1); focusclient(focustop(m), 1);
arrange(m, want_animation); arrange(m, want_animation);
printstatus(PRINT_ALL); printstatus();
} }
void view(const Arg *arg, bool want_animation) { void view(const Arg *arg, bool want_animation) {
@@ -5800,7 +5788,7 @@ void activatex11(struct wl_listener *listener, void *data) {
arrange(c->mon, false); arrange(c->mon, false);
} }
printstatus(PRINT_ALL); printstatus();
} }
void configurex11(struct wl_listener *listener, void *data) { void configurex11(struct wl_listener *listener, void *data) {
@@ -5872,7 +5860,7 @@ void sethints(struct wl_listener *listener, void *data) {
return; return;
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints); c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
printstatus(PRINT_ALL); printstatus();
if (c->isurgent && surface && surface->mapped) if (c->isurgent && surface && surface->mapped)
setborder_color(c); setborder_color(c);