Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions catwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,21 @@ void change_desktop(const Arg arg) {
}

void client_to_desktop(const Arg arg) {
client *tmp = current;
int tmp2 = current_desktop;

if(arg.i == current_desktop || current == NULL)
return;

// Add client to desktop
Window w = current->win;
int tmp2 = current_desktop;

remove_window(w);
XUnmapWindow(dis, w); // Fix visual window persistance glitch
save_desktop(tmp2); // Fix syncing issue to prevent segfault

select_desktop(arg.i);
add_window(tmp->win);
add_window(w);
save_desktop(arg.i);

// Remove client from current desktop
select_desktop(tmp2);
remove_window(current->win);

tile();
update_current();
Expand Down