bug fixes for growtoedge from tore. props to tore for all the growtoedge and movetoedge code, and directional focus code also since i dont think i mentioned his name before in the changelogs woot.
This commit is contained in:
parent
1045079482
commit
e531f69006
2 changed files with 16 additions and 14 deletions
|
@ -1262,7 +1262,7 @@ void action_growtoedge(union ActionData *data)
|
||||||
switch(data->diraction.direction) {
|
switch(data->diraction.direction) {
|
||||||
case OB_DIRECTION_NORTH:
|
case OB_DIRECTION_NORTH:
|
||||||
dest = client_directional_edge_search(c, OB_DIRECTION_NORTH);
|
dest = client_directional_edge_search(c, OB_DIRECTION_NORTH);
|
||||||
if(a->y > (y - c->size_inc.height))
|
if (a->y == y)
|
||||||
height = c->frame->area.height / 2;
|
height = c->frame->area.height / 2;
|
||||||
else {
|
else {
|
||||||
height = c->frame->area.y + c->frame->area.height - dest;
|
height = c->frame->area.y + c->frame->area.height - dest;
|
||||||
|
@ -1271,7 +1271,7 @@ void action_growtoedge(union ActionData *data)
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_WEST:
|
case OB_DIRECTION_WEST:
|
||||||
dest = client_directional_edge_search(c, OB_DIRECTION_WEST);
|
dest = client_directional_edge_search(c, OB_DIRECTION_WEST);
|
||||||
if(a->x > (x - c->size_inc.width))
|
if (a->x == x)
|
||||||
width = c->frame->area.width / 2;
|
width = c->frame->area.width / 2;
|
||||||
else {
|
else {
|
||||||
width = c->frame->area.x + c->frame->area.width - dest;
|
width = c->frame->area.x + c->frame->area.width - dest;
|
||||||
|
@ -1280,21 +1280,23 @@ void action_growtoedge(union ActionData *data)
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_SOUTH:
|
case OB_DIRECTION_SOUTH:
|
||||||
dest = client_directional_edge_search(c, OB_DIRECTION_SOUTH);
|
dest = client_directional_edge_search(c, OB_DIRECTION_SOUTH);
|
||||||
if(a->y + a->height <
|
if (a->y + a->height == y + c->frame->area.height) {
|
||||||
(y + c->frame->area.height + c->size_inc.height)) {
|
|
||||||
height = c->frame->area.height / 2;
|
height = c->frame->area.height / 2;
|
||||||
y = a->y + a->height - height;
|
y = a->y + a->height - height;
|
||||||
} else
|
} else
|
||||||
height = dest - c->frame->area.y;
|
height = dest - c->frame->area.y;
|
||||||
|
y += (height - c->frame->area.height) % c->size_inc.height;
|
||||||
|
height -= (height - c->frame->area.height) % c->size_inc.height;
|
||||||
break;
|
break;
|
||||||
case OB_DIRECTION_EAST:
|
case OB_DIRECTION_EAST:
|
||||||
dest = client_directional_edge_search(c, OB_DIRECTION_EAST);
|
dest = client_directional_edge_search(c, OB_DIRECTION_EAST);
|
||||||
if(a->x + a->width <
|
if (a->x + a->width == x + c->frame->area.width) {
|
||||||
(x + c->frame->area.width + c->size_inc.width)) {
|
|
||||||
width = c->frame->area.width / 2;
|
width = c->frame->area.width / 2;
|
||||||
x = a->x + a->width - width;
|
x = a->x + a->width - width;
|
||||||
} else
|
} else
|
||||||
width = dest - c->frame->area.x;
|
width = dest - c->frame->area.x;
|
||||||
|
x += (width - c->frame->area.width) % c->size_inc.width;
|
||||||
|
width -= (width - c->frame->area.width) % c->size_inc.width;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
|
|
|
@ -2796,11 +2796,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
|
||||||
his_edge_end = cur->frame->area.x + cur->frame->area.width;
|
his_edge_end = cur->frame->area.x + cur->frame->area.width;
|
||||||
his_offset = cur->frame->area.y + cur->frame->area.height;
|
his_offset = cur->frame->area.y + cur->frame->area.height;
|
||||||
|
|
||||||
if(his_offset + c->size_inc.height > my_offset)
|
if(his_offset + 1 > my_offset)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_offset < dest)
|
if(his_offset < dest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_edge_start >= my_edge_start &&
|
if(his_edge_start >= my_edge_start &&
|
||||||
his_edge_start <= my_edge_end)
|
his_edge_start <= my_edge_end)
|
||||||
|
@ -2837,11 +2837,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
|
||||||
his_offset = cur->frame->area.y;
|
his_offset = cur->frame->area.y;
|
||||||
|
|
||||||
|
|
||||||
if(his_offset - c->size_inc.height < my_offset)
|
if(his_offset - 1 < my_offset)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_offset > dest)
|
if(his_offset > dest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_edge_start >= my_edge_start &&
|
if(his_edge_start >= my_edge_start &&
|
||||||
his_edge_start <= my_edge_end)
|
his_edge_start <= my_edge_end)
|
||||||
|
@ -2877,11 +2877,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
|
||||||
his_edge_end = cur->frame->area.y + cur->frame->area.height;
|
his_edge_end = cur->frame->area.y + cur->frame->area.height;
|
||||||
his_offset = cur->frame->area.x + cur->frame->area.width;
|
his_offset = cur->frame->area.x + cur->frame->area.width;
|
||||||
|
|
||||||
if(his_offset + c->size_inc.width > my_offset)
|
if(his_offset + 1 < my_offset)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_offset < dest)
|
if(his_offset < dest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_edge_start >= my_edge_start &&
|
if(his_edge_start >= my_edge_start &&
|
||||||
his_edge_start <= my_edge_end)
|
his_edge_start <= my_edge_end)
|
||||||
|
@ -2918,11 +2918,11 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
|
||||||
his_edge_end = cur->frame->area.y + cur->frame->area.height;
|
his_edge_end = cur->frame->area.y + cur->frame->area.height;
|
||||||
his_offset = cur->frame->area.x;
|
his_offset = cur->frame->area.x;
|
||||||
|
|
||||||
if(his_offset - c->size_inc.width < my_offset)
|
if(his_offset - 1 < my_offset)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_offset > dest)
|
if(his_offset > dest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(his_edge_start >= my_edge_start &&
|
if(his_edge_start >= my_edge_start &&
|
||||||
his_edge_start <= my_edge_end)
|
his_edge_start <= my_edge_end)
|
||||||
|
|
Loading…
Reference in a new issue