mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Always Obey Configure Requests
If configure requests are not observed for tiled and fullscreen clients, it might happen that only a part of the window will be used: this is what happens if you change the font size of an urxvt window on-the-fly.
This commit is contained in:
parent
5ca8e69d02
commit
00ec4018d8
2 changed files with 61 additions and 51 deletions
14
events.c
14
events.c
|
@ -120,7 +120,6 @@ void configure_request(xcb_generic_event_t *evt)
|
|||
window_location_t loc;
|
||||
bool is_managed = locate_window(e->window, &loc);
|
||||
|
||||
if (!is_managed || is_floating(loc.node->client)) {
|
||||
uint16_t mask = 0;
|
||||
uint32_t values[7];
|
||||
unsigned short i = 0;
|
||||
|
@ -169,10 +168,17 @@ void configure_request(xcb_generic_event_t *evt)
|
|||
}
|
||||
|
||||
xcb_configure_window(dpy, e->window, mask, values);
|
||||
}
|
||||
|
||||
if (is_managed && is_floating(loc.node->client))
|
||||
apply_layout(loc.desktop, loc.node, root_rect);
|
||||
if (is_managed) {
|
||||
if (loc.node->client->fullscreen)
|
||||
window_move_resize(e->window, 0, 0, screen_width, screen_height);
|
||||
else if (is_tiled(loc.node->client)) {
|
||||
xcb_rectangle_t rect = loc.node->client->tiled_rectangle;
|
||||
window_move_resize(e->window, rect.x, rect.y, rect.width, rect.height);
|
||||
} else {
|
||||
window_draw_border(loc.node, (loc.node == loc.desktop->focus));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void destroy_notify(xcb_generic_event_t *evt)
|
||||
|
|
6
window.c
6
window.c
|
@ -173,7 +173,11 @@ void toggle_fullscreen(client_t *c)
|
|||
c->fullscreen = false;
|
||||
xcb_atom_t values[] = {XCB_NONE};
|
||||
xcb_ewmh_set_wm_state(ewmh, c->window, LENGTH(values), values);
|
||||
xcb_rectangle_t rect = c->floating_rectangle;
|
||||
xcb_rectangle_t rect;
|
||||
if (is_floating(c))
|
||||
rect = c->floating_rectangle;
|
||||
else
|
||||
rect = c->tiled_rectangle;
|
||||
window_border_width(c->window, border_width);
|
||||
window_move_resize(c->window, rect.x, rect.y, rect.width, rect.height);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue