preliminary change to the 9 corners thing, to add a recursive 9 corners inside the middle one
This commit is contained in:
parent
ff59630f51
commit
c1a124fcf2
1 changed files with 29 additions and 2 deletions
|
@ -1598,9 +1598,36 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch)
|
|||
return prop_atoms.net_wm_moveresize_size_bottom;
|
||||
else if (y - cy < ch / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_top;
|
||||
else {
|
||||
/* inside the middle square... */
|
||||
cx += cw / 3;
|
||||
cy += ch / 3;
|
||||
cw /= 3;
|
||||
ch /= 3;
|
||||
if (x - cx > cw * 2 / 3) {
|
||||
if (y - cy > ch * 2 / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_bottomright;
|
||||
else if (y - cy < ch / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_topright;
|
||||
else
|
||||
return prop_atoms.net_wm_moveresize_size_right;
|
||||
} else if (x - cx < cw / 3) {
|
||||
if (y - cy > ch * 2 / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_bottomleft;
|
||||
else if (y - cy < ch / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_topleft;
|
||||
else
|
||||
return prop_atoms.net_wm_moveresize_size_left;
|
||||
} else
|
||||
if (y - cy > ch * 2 / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_bottom;
|
||||
else if (y - cy < ch / 3)
|
||||
return prop_atoms.net_wm_moveresize_size_top;
|
||||
else {
|
||||
return prop_atoms.net_wm_moveresize_move;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void action_moveresize(union ActionData *data)
|
||||
|
|
Loading…
Reference in a new issue