@Rico: read the code carefully, and realize that evaluations 'short circuit' and thus if screen.ActiveWindow == null the rest of that expression wont even be evaluated, so we dont get a NPE.
rev1172 has this:
(screen.ActiveWindow == null || !screen.ActiveWindow.IsFullscreen || !WindowIntersectingOther)
which if we ignore the 'new' check, is this:
(screen.ActiveWindow == null || !screen.ActiveWindow.IsFullscreen)
But like I said, the == null check in 1094 (and still in 1172) will short-circuit the expression and thus screen.ActiveWindow.IsFullscreen only executes if screen.ActiveWindow != null (because if it is null, the whole expression is immediately true and we dont have to even check the RHS).
@Rico: read the code carefully, and realize that evaluations 'short circuit' and thus if screen.ActiveWindow == null the rest of that expression wont even be evaluated, so we dont get a NPE.
rev1094 has this: ActiveWindow == null || (screen. ActiveWindow != null && !screen. ActiveWindow. IsFullscreen) )
(screen.
rev1172 has this: ActiveWindow == null || !screen. ActiveWindow. IsFullscreen || !WindowIntersec tingOther)
(screen.
which if we ignore the 'new' check, is this: ActiveWindow == null || !screen. ActiveWindow. IsFullscreen)
(screen.
But like I said, the == null check in 1094 (and still in 1172) will short-circuit the expression and thus screen. ActiveWindow. IsFullscreen only executes if screen.ActiveWindow != null (because if it is null, the whole expression is immediately true and we dont have to even check the RHS).