parent
b68a400abf
commit
80ce13e44e
|
@ -409,6 +409,11 @@ struct Window {
|
|||
|
||||
/** Depth of the window */
|
||||
uint16_t depth;
|
||||
|
||||
/* the wanted size of the window, used in combination with size
|
||||
* increments (see below). */
|
||||
int base_width;
|
||||
int base_height;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -572,10 +577,6 @@ struct Con {
|
|||
|
||||
/* aspect ratio from WM_NORMAL_HINTS (MPlayer uses this for example) */
|
||||
double aspect_ratio;
|
||||
/* the wanted size of the window, used in combination with size
|
||||
* increments (see below). */
|
||||
int base_width;
|
||||
int base_height;
|
||||
|
||||
/* the x11 border pixel attribute */
|
||||
int border_width;
|
||||
|
|
|
@ -55,17 +55,17 @@ void floating_check_size(Con *floating_con) {
|
|||
border_rect.height += render_deco_height();
|
||||
|
||||
if (focused_con->height_increment &&
|
||||
floating_con->rect.height >= focused_con->base_height + border_rect.height) {
|
||||
floating_con->rect.height -= focused_con->base_height + border_rect.height;
|
||||
floating_con->rect.height >= focused_con->window->base_height + border_rect.height) {
|
||||
floating_con->rect.height -= focused_con->window->base_height + border_rect.height;
|
||||
floating_con->rect.height -= floating_con->rect.height % focused_con->height_increment;
|
||||
floating_con->rect.height += focused_con->base_height + border_rect.height;
|
||||
floating_con->rect.height += focused_con->window->base_height + border_rect.height;
|
||||
}
|
||||
|
||||
if (focused_con->width_increment &&
|
||||
floating_con->rect.width >= focused_con->base_width + border_rect.width) {
|
||||
floating_con->rect.width -= focused_con->base_width + border_rect.width;
|
||||
floating_con->rect.width >= focused_con->window->base_width + border_rect.width) {
|
||||
floating_con->rect.width -= focused_con->window->base_width + border_rect.width;
|
||||
floating_con->rect.width -= floating_con->rect.width % focused_con->width_increment;
|
||||
floating_con->rect.width += focused_con->base_width + border_rect.width;
|
||||
floating_con->rect.width += focused_con->window->base_width + border_rect.width;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -960,10 +960,10 @@ static bool handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t stat
|
|||
base_height = size_hints.min_height;
|
||||
}
|
||||
|
||||
if (base_width != con->base_width ||
|
||||
base_height != con->base_height) {
|
||||
con->base_width = base_width;
|
||||
con->base_height = base_height;
|
||||
if (base_width != con->window->base_width ||
|
||||
base_height != con->window->base_height) {
|
||||
con->window->base_width = base_width;
|
||||
con->window->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;
|
||||
|
|
Loading…
Reference in New Issue