Skip to content

Commit

Permalink
Unix: fix detecting screen size changes after having been suspended b…
Browse files Browse the repository at this point in the history
…y a signal
  • Loading branch information
magiblot committed Nov 16, 2024
1 parent 5fed541 commit 565154c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/platform/linuxcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inline LinuxConsoleAdapter::LinuxConsoleAdapter( DisplayAdapter &aDisplay,
wrapper(aWrapper),
gpm(aGpm)
{
// Ensure we don't miss a possible undetected screen size change (e.g. after
// recovering from SIGTSTP).
if (sigwinch)
sigwinch->signal();
}

LinuxConsoleAdapter &LinuxConsoleAdapter::create( ConsoleCtl &con,
Expand Down
4 changes: 4 additions & 0 deletions source/platform/unixcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inline UnixConsoleAdapter::UnixConsoleAdapter( DisplayAdapter &aDisplay,
sigwinch(aSigwinch),
input(aInput)
{
// Ensure we don't miss a possible undetected screen size change (e.g. after
// recovering from SIGTSTP).
if (sigwinch)
sigwinch->signal();
}

UnixConsoleAdapter &UnixConsoleAdapter::create( ConsoleCtl &con,
Expand Down

0 comments on commit 565154c

Please sign in to comment.