X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=bcd1b60fd1f05cee66e17e7b6733d38959e11560;hb=98304406432cda3a94c2a57f0812714a229ec77a;hp=4573a866d77cfea489f4004cc0b18aa28936a32e;hpb=e384e8a42e933fd75fcb57d6a575b9903e55ebde;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 4573a866..bcd1b60f 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1549,7 +1549,7 @@ void action_desktop_dir(union ActionData *data) !data->sendtodir.inter.final || data->sendtodir.inter.cancel) { - screen_set_desktop(d, TRUE); + if (d != screen_desktop) screen_set_desktop(d, TRUE); } } @@ -1570,7 +1570,7 @@ void action_send_to_desktop_dir(union ActionData *data) data->sendtodir.inter.cancel) { client_set_desktop(c, d, data->sendtodir.follow); - if (data->sendtodir.follow) + if (data->sendtodir.follow && d != screen_desktop) screen_set_desktop(d, TRUE); } } @@ -1589,7 +1589,8 @@ void action_toggle_decorations(union ActionData *data) 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 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch) |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| @@ -1650,6 +1651,15 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch) +---------------------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; else if (y >= A && y >= B && a) @@ -1689,8 +1699,6 @@ void action_moveresize(union ActionData *data) ObClient *c = data->moveresize.any.c; guint32 corner; - if (!client_normal(c)) return; - if (data->moveresize.keyboard) { corner = (data->moveresize.move ? prop_atoms.net_wm_moveresize_move_keyboard : @@ -1707,7 +1715,7 @@ void action_moveresize(union ActionData *data) 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);