public override void OnFocusChanged(WindowActivityMonitorInfo monitorInfo, ref bool handled) { Log.Debug(); if (monitorInfo.IsNewWindow) { _scannerShown = false; } if (autoSwitchScanners) { if (!_scannerShown) { displayScanner(monitorInfo, ref handled); } else { handled = true; } } else { base.OnFocusChanged(monitorInfo, ref handled); if (!_scannerShown) { showPanel(this, new PanelRequestEventArgs(PanelClasses.Alphabet, monitorInfo)); _scannerShown = true; } handled = true; } }