Bugfix: Reconfigure all clients in stacking, correctly ignore events, event when for the root window
This commit is contained in:
parent
0344ca3f36
commit
8b34eb5fc2
@ -338,6 +338,7 @@ int handle_map_notify_event(void *prophs, xcb_connection_t *conn, xcb_map_notify
|
||||
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;
|
||||
@ -353,14 +354,16 @@ int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_n
|
||||
|
||||
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");
|
||||
@ -395,6 +398,8 @@ int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_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);
|
||||
|
15
src/layout.c
15
src/layout.c
@ -304,6 +304,13 @@ void render_container(xcb_connection_t *conn, Container *container) {
|
||||
/* Reconfigure the currently focused client, if necessary. It is the only visible one */
|
||||
client = container->currently_focused;
|
||||
|
||||
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) {
|
||||
/* 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 |
|
||||
@ -318,17 +325,11 @@ void render_container(xcb_connection_t *conn, Container *container) {
|
||||
|
||||
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)
|
||||
decorate_window(conn, client, stack_win->window, stack_win->gc,
|
||||
current_client++ * decoration_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void render_bars(xcb_connection_t *conn, Workspace *r_ws, int width, int *height) {
|
||||
Client *client;
|
||||
|
Loading…
Reference in New Issue
Block a user