mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-07 08:21:36 -04:00
fix: fix drag to resize
This commit is contained in:
parent
8a769eaf03
commit
02690694d8
2 changed files with 4 additions and 6 deletions
|
|
@ -426,11 +426,6 @@ int32_t resizewin(const Arg *arg) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (ISTILED(c)) {
|
if (ISTILED(c)) {
|
||||||
Client *target_client = c;
|
|
||||||
if (is_scroller_layout(c->mon) &&
|
|
||||||
(c->prev_in_stack || c->next_in_stack)) {
|
|
||||||
target_client = get_scroll_stack_head(target_client);
|
|
||||||
}
|
|
||||||
switch (arg->ui) {
|
switch (arg->ui) {
|
||||||
case NUM_TYPE_MINUS:
|
case NUM_TYPE_MINUS:
|
||||||
offsetx = -arg->i;
|
offsetx = -arg->i;
|
||||||
|
|
@ -454,7 +449,7 @@ int32_t resizewin(const Arg *arg) {
|
||||||
offsety = arg->i2;
|
offsety = arg->i2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
resize_tile_client(target_client, false, offsetx, offsety, 0);
|
resize_tile_client(c, false, offsetx, offsety, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -464,6 +464,9 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
|
||||||
fmaxf(0.1f, fminf(1.0f, new_scroller_proportion));
|
fmaxf(0.1f, fminf(1.0f, new_scroller_proportion));
|
||||||
|
|
||||||
grabc->scroller_proportion = new_scroller_proportion;
|
grabc->scroller_proportion = new_scroller_proportion;
|
||||||
|
if(grabc->prev_in_stack) {
|
||||||
|
grabc->prev_in_stack->scroller_proportion = grabc->scroller_proportion;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isdrag) {
|
if (!isdrag) {
|
||||||
arrange(grabc->mon, false, false);
|
arrange(grabc->mon, false, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue