@@ -678,8 +678,7 @@ setup_window(xcb_window_t win)
678
678
client -> min_height = hints .min_height ;
679
679
}
680
680
681
- if (hints .flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC &&
682
- conf .resize_hints ) {
681
+ if (hints .flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC ) {
683
682
client -> width_inc = hints .width_inc ;
684
683
client -> height_inc = hints .height_inc ;
685
684
}
@@ -922,10 +921,10 @@ resize_window(xcb_window_t win, int16_t w, int16_t h)
922
921
if (client -> min_height != 0 && ah < client -> min_height )
923
922
ah = client -> min_height ;
924
923
925
- focused_win -> geom .width = aw ;
926
- focused_win -> geom .height = ah ;
924
+ client -> geom .width = aw - conf . resize_hints * ( aw % client -> width_inc ) ;
925
+ client -> geom .height = ah - conf . resize_hints * ( ah % client -> height_inc ) ;
927
926
928
- resize_window_absolute (win , aw , ah );
927
+ resize_window_absolute (win , client -> geom . width , client -> geom . height );
929
928
}
930
929
931
930
/*
@@ -2173,11 +2172,11 @@ event_configure_request(xcb_generic_event_t *ev)
2173
2172
2174
2173
if (e -> value_mask & XCB_CONFIG_WINDOW_WIDTH
2175
2174
&& !client -> maxed && !client -> monocled && !client -> hmaxed )
2176
- client -> geom .width = e -> width - (e -> width % client -> width_inc );
2175
+ client -> geom .width = e -> width - conf . resize_hints * (e -> width % client -> width_inc );
2177
2176
2178
2177
if (e -> value_mask & XCB_CONFIG_WINDOW_HEIGHT
2179
2178
&& !client -> maxed && !client -> monocled && !client -> vmaxed )
2180
- client -> geom .height = e -> height - (e -> height % client -> height_inc );
2179
+ client -> geom .height = e -> height - conf . resize_hints * (e -> height % client -> height_inc );
2181
2180
2182
2181
if (e -> value_mask & XCB_CONFIG_WINDOW_STACK_MODE ) {
2183
2182
values [0 ] = e -> stack_mode ;
0 commit comments