Skip to content

Commit

Permalink
Fixed restoresession not properly restoring desktops (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerjenigeUberMensch authored Jun 24, 2024
1 parent 67465ac commit 5e21d99
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ restoresession(void)
u8 isdesk = 0;
u8 isclient = 0;
u8 isclients = 0;
u8 isclientsend = 0;

if(!fr)
{ return;
Expand Down Expand Up @@ -499,7 +498,7 @@ restoresession(void)
if(!desk)
{ continue;
}
if(!isclientsend)
if(strcmp(str, "ClientsEnd."))
{
const u8 SSCANF_CHECK_SUM = 1;
XCBWindow win = 0;
Expand All @@ -521,6 +520,9 @@ restoresession(void)
DEBUG0("Failed to pass move checksum for client.");
}
}
else /* end stream */
{ isclients = 0;
}
}
if(isdesk)
{
Expand All @@ -541,7 +543,7 @@ restoresession(void)
isdesk += !strcmp(str, "Desktop.");
isclient += !strcmp(str, "Client.");
isclients += !strcmp(str, "Clients.");
isclientsend += !strcmp(str, "ClientsEnd.");

}
fclose(fr);
/* map all the windows again */
Expand Down

0 comments on commit 5e21d99

Please sign in to comment.