using is_active instead of has_focus to determine if window is active.
Put sidebar into scrolledwindow