summaryrefslogtreecommitdiff
path: root/openbox/action.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-25 14:18:45 +0000
committerDana Jansens <danakj@orodu.net>2007-05-25 14:18:45 +0000
commitae65a6b25e208e9fadfeb1a1fa6ae7ea9ac4d874 (patch)
treea16ff8b2eec739ab05ef3ffe57411269d67277ac /openbox/action.c
parent912f8eed504c2a49c700b345d4171c3c2cdb0df7 (diff)
cleanup, and don't send windows to desktop if they are already there
Diffstat (limited to 'openbox/action.c')
-rw-r--r--openbox/action.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/openbox/action.c b/openbox/action.c
index 3a4bab15..acb33749 100644
--- a/openbox/action.c
+++ b/openbox/action.c
@@ -1587,9 +1587,8 @@ void action_send_to_desktop(union ActionData *data)
if (data->sendto.desk < screen_num_desktops ||
data->sendto.desk == DESKTOP_ALL) {
client_set_desktop(c, data->sendto.desk, data->sendto.follow);
- if (data->sendto.follow)
- screen_set_desktop(data->sendto.desk,
- data->sendto.follow && c == focus_client);
+ if (data->sendto.follow && data->sendto.desk != screen_desktop)
+ screen_set_desktop(data->sendto.desk, c == focus_client);
}
}
@@ -1646,7 +1645,7 @@ void action_send_to_desktop_dir(union ActionData *data)
{
client_set_desktop(c, d, data->sendtodir.follow);
if (data->sendtodir.follow && d != screen_desktop)
- screen_set_desktop(d, data->sendtodir.follow && c == focus_client);
+ screen_set_desktop(d, c == focus_client);
}
}