Skip to content

Commit

Permalink
fix: fatal exception on redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 13, 2023
1 parent add74f3 commit bde417f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ public RedrawContainersHandler(

public CommandResponse Handle(RedrawContainersCommand command)
{
// Get windows that should be redrawn.
// Get windows that should be redrawn. When redrawing after a keybinding that
// changes a window's type (eg. tiling -> floating), the original detached window
// might still be queued for a redraw and should be ignored.
var windowsToRedraw = _containerService.ContainersToRedraw
.SelectMany(container => container.Flatten())
.OfType<Window>()
.Distinct()
.Where(window => !window.IsDetached())
.ToList();

// Get windows that are minimized/maximized and shouldn't be.
Expand Down

0 comments on commit bde417f

Please sign in to comment.