mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Fix 'send_to_monitor'
This commit is contained in:
parent
2a3362fc4b
commit
e771dd4c90
2 changed files with 7 additions and 5 deletions
|
@ -128,6 +128,9 @@ The following messages are handled:
|
|||
magnetise COR
|
||||
Move all the fences toward the given corner.
|
||||
|
||||
send_to_monitor MONITOR_NAME
|
||||
Send the focused window to the given monitor.
|
||||
|
||||
send_to DESKTOP_NAME
|
||||
Send the focused window to the given desktop.
|
||||
|
||||
|
|
|
@ -129,11 +129,10 @@ void process_message(char *msg, char *rsp)
|
|||
} else if (strcmp(cmd, "send_to_monitor") == 0) {
|
||||
char *name = strtok(NULL, TOKEN_SEP);
|
||||
if (name != NULL) {
|
||||
desktop_location_t loc;
|
||||
if (locate_desktop(name, &loc)) {
|
||||
transfer_node(mon, mon->desk, loc.monitor, loc.desktop, mon->desk->focus);
|
||||
if (mon != loc.monitor && loc.monitor->desk == loc.desktop)
|
||||
arrange(loc.monitor, loc.desktop);
|
||||
monitor_t *m = find_monitor(name);
|
||||
if (m != NULL && m != mon) {
|
||||
transfer_node(mon, mon->desk, m, m->desk, mon->desk->focus);
|
||||
arrange(m, m->desk);
|
||||
}
|
||||
}
|
||||
} else if (strcmp(cmd, "send_to") == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue