stack: Drop unused code

Since commit 2b2b2d319191f5 the code is unused and triggers a
compiler error with -Werror=unused-but-set-variable.
display: Tweak code to work around a compiler warning

The compiler is not quite smart enough to figure out that the condition
for setting the "compositor" variable matches a later condition for
accessing it, so express this in a way the compiler will understand.