window_attributes_t wa = { TAG_VALUE };
wa.u.override_redirect = event->override_redirect;
printf("MapNotify for 0x%08x, serial is %d.\n", event->window, event->sequence);
+ printf("setting ignore_notify_event = %d\n", event->sequence);
ignore_notify_event = event->sequence;
manage_window(prophs, conn, event->window, wa);
return 1;
printf("handle_configure_event\n");
printf("event->x = %d, ->y = %d, ->width = %d, ->height = %d\n", event->x, event->y, event->width, event->height);
+ printf("sequence = %d\n", event->sequence);
+
+ ignore_notify_event = event->sequence;
+
if (event->event == root) {
printf("reconfigure of the root window, need to xinerama\n");
xinerama_requery_screens(conn);
return 1;
}
- ignore_notify_event = event->sequence;
-
Client *client = table_get(byChild, event->window);
if (client == NULL) {
printf("client not managed, ignoring\n");
int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event) {
xcb_window_t root = xcb_setup_roots_iterator(xcb_get_setup(conn)).data->root;
+ printf("setting ignore_notify_event = %d\n", event->sequence);
+
ignore_notify_event = event->sequence;
Client *client = table_get(byChild, event->window);
/* Reconfigure the currently focused client, if necessary. It is the only visible one */
client = container->currently_focused;
- /* Check if we changed client->x or client->y by updating it.
- * Note the bitwise OR instead of logical OR to force evaluation of both statements */
- if (client->force_reconfigure |
- HAS_CHANGED(old_value_1, client->rect.x, container->x) |
- HAS_CHANGED(old_value_2, client->rect.y, container->y + (decoration_height * num_clients)))
- reposition_client(conn, client);
-
- if (client->force_reconfigure |
- HAS_CHANGED(old_value_1, client->rect.width, container->width) |
- HAS_CHANGED(old_value_2, client->rect.height, container->height - (decoration_height * num_clients)))
- resize_client(conn, client);
-
- client->force_reconfigure = false;
-
if (container->workspace->fullscreen_client == NULL) {
uint32_t values[] = { XCB_STACK_MODE_ABOVE };
xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_STACK_MODE, values);
}
/* Render the decorations of all clients */
- CIRCLEQ_FOREACH(client, &(container->clients), clients)
+ CIRCLEQ_FOREACH(client, &(container->clients), clients) {
+ /* Check if we changed client->x or client->y by updating it.
+ * Note the bitwise OR instead of logical OR to force evaluation of both statements */
+ if (client->force_reconfigure |
+ HAS_CHANGED(old_value_1, client->rect.x, container->x) |
+ HAS_CHANGED(old_value_2, client->rect.y, container->y + (decoration_height * num_clients)))
+ reposition_client(conn, client);
+
+ if (client->force_reconfigure |
+ HAS_CHANGED(old_value_1, client->rect.width, container->width) |
+ HAS_CHANGED(old_value_2, client->rect.height, container->height - (decoration_height * num_clients)))
+ resize_client(conn, client);
+
+ client->force_reconfigure = false;
+
decorate_window(conn, client, stack_win->window, stack_win->gc,
current_client++ * decoration_height);
+ }
}
}