Skip to content

Commit

Permalink
desk_add: fix starting desk/monitor
Browse files Browse the repository at this point in the history
When moving windows between screens using the keyboard, the mouse
pointer won't be on the same screen as the window is.   Rather than make
that assumption, look up the desk of the monitor the window is currently
on.
  • Loading branch information
ThomasAdam committed Sep 2, 2022
1 parent cee5f75 commit bc12d21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fvwm/virtual.c
Expand Up @@ -2897,11 +2897,13 @@ desk_add_fw(FvwmWindow *fw)
{
struct desktop_fw *df, *df_loop;
struct desk_fvwmwin *dfws;
int desk = monitor_get_current()->virtual_scr.CurrentDesk;
int desk;

if (fw == NULL)
return;

desk = fw->m->virtual_scr.CurrentDesk;

if (TAILQ_EMPTY(&desktop_fvwm_q))
TAILQ_INIT(&desktop_fvwm_q);

Expand Down

0 comments on commit bc12d21

Please sign in to comment.