Skip to content

Commit

Permalink
desk_add: fix window counting
Browse files Browse the repository at this point in the history
When counting windows on desks, use the window's desk assignment, rather
than the screen's current desk.

This should fix window counting with SkipMapping.
  • Loading branch information
ThomasAdam committed Oct 9, 2022
1 parent 62b9eb7 commit 3f71650
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions fvwm/placement.c
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,8 @@ Bool setup_window_placement(
__explain_placement(fw, &reason);
}

desk_add_fw(fw);

return (rc == 0) ? False : True;
}

Expand Down
3 changes: 2 additions & 1 deletion fvwm/virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "eventmask.h"
#include "misc.h"
#include "screen.h"
#include "update.h"
#include "virtual.h"
#include "module_interface.h"
#include "module_list.h"
Expand Down Expand Up @@ -2964,7 +2965,7 @@ desk_add_fw(FvwmWindow *fw)
if (fw == NULL)
return;

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

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

0 comments on commit 3f71650

Please sign in to comment.