arrange on old_screen, not on event screen
This commit is contained in:
parent
47ec01e571
commit
6e4942711f
17
screen.c
17
screen.c
|
@ -227,22 +227,23 @@ uicb_movetoscreen(Display *disp,
|
||||||
awesome_config * awesomeconf,
|
awesome_config * awesomeconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
int screen;
|
int new_screen, prev_screen;
|
||||||
|
|
||||||
if(!XineramaIsActive(disp) || !sel)
|
if(!XineramaIsActive(disp) || !sel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
{
|
{
|
||||||
screen = strtol(arg, NULL, 10);
|
new_screen = strtol(arg, NULL, 10);
|
||||||
if(screen >= get_screen_count(disp) || screen < 0)
|
if(new_screen >= get_screen_count(disp) || new_screen < 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
screen = sel->screen + 1 >= get_screen_count(disp) ? 0 : sel->screen + 1;
|
new_screen = sel->screen + 1 >= get_screen_count(disp) ? 0 : sel->screen + 1;
|
||||||
|
|
||||||
move_client_to_screen(sel, &awesomeconf[screen - awesomeconf->screen], True);
|
prev_screen = sel->screen;
|
||||||
move_mouse_pointer_to_screen(disp, screen);
|
move_client_to_screen(sel, &awesomeconf[new_screen - awesomeconf->screen], True);
|
||||||
arrange(disp, drawcontext, awesomeconf);
|
move_mouse_pointer_to_screen(disp, new_screen);
|
||||||
arrange(disp, &drawcontext[screen - awesomeconf->screen], &awesomeconf[screen - awesomeconf->screen]);
|
arrange(disp, drawcontext, &awesomeconf[prev_screen - awesomeconf->screen]);
|
||||||
|
arrange(disp, &drawcontext[new_screen - awesomeconf->screen], &awesomeconf[new_screen - awesomeconf->screen]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue