调整窗口堆叠顺序
This commit is contained in:
16
src/main.c
16
src/main.c
@@ -829,7 +829,21 @@ void arrange(monitor_t *monitor) {
|
||||
|
||||
void restack(monitor_t *monitor) {
|
||||
draw_monitor_bar(monitor);
|
||||
/* TODO: */
|
||||
if (!monitor->selected_client) return;
|
||||
if (monitor->selected_client->floating || !monitor->layout->arrange) {
|
||||
raise_window(monitor->selected_client->window);
|
||||
}
|
||||
if (monitor->layout->arrange) {
|
||||
xcb_window_t sibling = monitor->bar_window;
|
||||
for (client_t *c = monitor->clients_stack; c; c = c->stack_next) {
|
||||
if (!c->floating && CLIENT_VISIBLE(c)) {
|
||||
place_window_below_sibling(c->window, sibling);
|
||||
sibling = c->window;
|
||||
}
|
||||
}
|
||||
}
|
||||
flush_xcb_connection();
|
||||
while (xcb_check_mask_event(XCB_EVENT_MASK_ENTER_WINDOW));
|
||||
}
|
||||
void focus(client_t *client) {
|
||||
if (!client || !CLIENT_VISIBLE(client)) {
|
||||
|
||||
Reference in New Issue
Block a user