X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=804fe0be76506ba55cf87d9609c6adb9ddf90eac;hb=775d5da7ade2d184dfcef5c046b8d39f91804f01;hp=0cf233ad8da81fd41bb5a7e55f045473f6d7bcef;hpb=44404518c3997c33758f9ed8dad57585e041454f;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 0cf233ad..804fe0be 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1245,7 +1245,7 @@ void action_unfocus (union ActionData *data) void action_iconify(union ActionData *data) { client_action_start(data); - client_iconify(data->client.any.c, TRUE, TRUE); + client_iconify(data->client.any.c, TRUE, TRUE, FALSE); client_action_end(data); } @@ -1545,9 +1545,11 @@ void action_desktop_dir(union ActionData *data) data->desktopdir.inter.any.interactive, data->desktopdir.inter.final, data->desktopdir.inter.cancel); + /* only move the desktop when the action is complete. if we switch + desktops during the interactive action, focus will move but with + NotifyWhileGrabbed and applications don't like that. */ if (!data->sendtodir.inter.any.interactive || - !data->sendtodir.inter.final || - data->sendtodir.inter.cancel) + (data->sendtodir.inter.final && !data->sendtodir.inter.cancel)) { if (d != screen_desktop) screen_set_desktop(d, TRUE); } @@ -1565,9 +1567,11 @@ void action_send_to_desktop_dir(union ActionData *data) data->sendtodir.inter.any.interactive, data->sendtodir.inter.final, data->sendtodir.inter.cancel); + /* only move the desktop when the action is complete. if we switch + desktops during the interactive action, focus will move but with + NotifyWhileGrabbed and applications don't like that. */ if (!data->sendtodir.inter.any.interactive || - !data->sendtodir.inter.final || - data->sendtodir.inter.cancel) + (data->sendtodir.inter.final && !data->sendtodir.inter.cancel)) { client_set_desktop(c, d, data->sendtodir.follow); if (data->sendtodir.follow && d != screen_desktop) @@ -1589,7 +1593,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 +1634,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 +1655,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 +1703,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 +1719,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); @@ -1894,17 +1906,17 @@ void action_toggle_dockautohide(union ActionData *data) void action_toggle_show_desktop(union ActionData *data) { - screen_show_desktop(!screen_showing_desktop, TRUE); + screen_show_desktop(!screen_showing_desktop, NULL); } void action_show_desktop(union ActionData *data) { - screen_show_desktop(TRUE, TRUE); + screen_show_desktop(TRUE, NULL); } void action_unshow_desktop(union ActionData *data) { - screen_show_desktop(FALSE, TRUE); + screen_show_desktop(FALSE, NULL); } void action_break_chroot(union ActionData *data)