Change logic of mouse adapter for selection frame to depend on local
variable rather than shared variable.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>