}
parse_cmd(bind->command);
- tree_render();
return 1;
}
*
*/
static int handle_unmap_notify_event(xcb_unmap_notify_event_t *event) {
+ // XXX: this is commented out because in src/x.c we disable EnterNotify events
/* we need to ignore EnterNotify events which will be generated because a
* different window is visible now */
- add_ignore_event(event->sequence, XCB_ENTER_NOTIFY);
+ //add_ignore_event(event->sequence, XCB_ENTER_NOTIFY);
DLOG("UnmapNotify for 0x%08x (received from 0x%08x), serial %d\n", event->window, event->event, event->sequence);
Con *con = con_by_window_id(event->window);
return 1;
}
- tree_close(con, false, false);
+ tree_close(con, DONT_KILL_WINDOW, false);
tree_render();
x_push_changes(croot);
return 1;
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
return 1;
- window_update_name(con->window, prop);
+ window_update_name(con->window, prop, false);
x_push_changes(croot);
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
return 1;
- window_update_name_legacy(con->window, prop);
+ window_update_name_legacy(con->window, prop, false);
x_push_changes(croot);
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
return 1;
- window_update_class(con->window, prop);
+ window_update_class(con->window, prop, false);
return 0;
}
(event->data.data32[0] == _NET_WM_STATE_ADD ||
event->data.data32[0] == _NET_WM_STATE_TOGGLE))) {
DLOG("toggling fullscreen\n");
- con_toggle_fullscreen(con);
+ con_toggle_fullscreen(con, CF_OUTPUT);
}
tree_render();
con->base_height = base_height;
DLOG("client's base_height changed to %d\n", base_height);
DLOG("client's base_width changed to %d\n", base_width);
+ changed = true;
}
/* If no aspect ratio was set or if it was invalid, we ignore the hints */
/* Check if we need to set proportional_* variables using the correct ratio */
if ((width / height) < min_aspect) {
- con->proportional_width = width;
- con->proportional_height = width / min_aspect;
+ if (con->proportional_width != width ||
+ con->proportional_height != (width / min_aspect)) {
+ con->proportional_width = width;
+ con->proportional_height = width / min_aspect;
+ changed = true;
+ }
} else if ((width / height) > max_aspect) {
- con->proportional_width = width;
- con->proportional_height = width / max_aspect;
+ if (con->proportional_width != width ||
+ con->proportional_height != (width / max_aspect)) {
+ con->proportional_width = width;
+ con->proportional_height = width / max_aspect;
+ changed = true;
+ }
} else goto render_and_return;
render_and_return:
- tree_render();
+ if (changed)
+ tree_render();
return 1;
}