all repos — openbox @ 03699417fdfdeec803e24e200d37a9d8b95b3913

openbox fork - make it a bit more like ryudo

only allow west/move/east for shaded windows
Mikael Magnusson mikachu@comhem.se
commit

03699417fdfdeec803e24e200d37a9d8b95b3913

parent

2d2af5314155063a884cd40998adc372d12843cf

1 files changed, 17 insertions(+), 7 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -1589,7 +1589,8 @@ client_set_undecorated(c, !c->undecorated);

client_action_end(data); } -static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch) +static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch, + gboolean shaded) { /* let's make x and y client relative instead of screen relative */ x = x - cx;

@@ -1629,11 +1630,11 @@ C---------------------+----A--+-------+--B----+---------------------D

|CCCCCCC | A B | DDDDDDD| | CCCCCCCC | A | | B | DDDDDDDD | | CCCCCCC A B DDDDDDD | - - - - - - - - - - - - +CCCCCCC+aaaaaaa+DDDDDDD+ - - - - - - - - - - - - | | b c | | - | west | b move c | east | - | | b c | | - - - - - - - - - - - - +EEEEEEE+ddddddd+FFFFFFF+- - - - - - - - - - - + - - - - - - - - - - - +CCCCCCC+aaaaaaa+DDDDDDD+ - - - - - - - - - - - - + | | b c | | sh + | west | b move c | east | ad + | | b c | | ed + - - - - - - - - - - - +EEEEEEE+ddddddd+FFFFFFF+- - - - - - - - - - - - | EEEEEEE G H FFFFFFF | | EEEEEEEE | G | | H | FFFFFFFF | |EEEEEEE | G H | FFFFFFF|

@@ -1649,6 +1650,15 @@ | |G | | H| |

| |G H| | +---------------------G-------|-------|-------H---------------------+ */ + + if (shaded) { + /* for shaded windows, you can only resize west/east and move */ + if (b) + return prop_atoms.net_wm_moveresize_size_left; + if (c) + return prop_atoms.net_wm_moveresize_size_right; + return prop_atoms.net_wm_moveresize_move; + } if (y < A && y >= C) return prop_atoms.net_wm_moveresize_size_topleft;

@@ -1705,7 +1715,7 @@ clients size */

c->area.width + c->frame->size.left + c->frame->size.right, c->area.height + c->frame->size.top + - c->frame->size.bottom)); + c->frame->size.bottom, c->shaded)); } moveresize_start(c, data->any.x, data->any.y, data->any.button, corner);