mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-10-22 11:54:46 +00:00
Fix 25: do not set Handled flag
This commit is contained in:
@@ -41,23 +41,23 @@ namespace QuickLook
|
|||||||
case Keys.Down:
|
case Keys.Down:
|
||||||
case Keys.Left:
|
case Keys.Left:
|
||||||
case Keys.Right:
|
case Keys.Right:
|
||||||
SwitchPreview(kea);
|
SwitchPreview();
|
||||||
break;
|
break;
|
||||||
case Keys.Space:
|
case Keys.Space:
|
||||||
TogglePreview(kea);
|
TogglePreview();
|
||||||
break;
|
break;
|
||||||
case Keys.Escape:
|
case Keys.Escape:
|
||||||
ClosePreview(kea);
|
ClosePreview();
|
||||||
break;
|
break;
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
RunAndClosePreview(kea);
|
RunAndClosePreview();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void RunAndClosePreview(KeyEventArgs kea = null)
|
internal void RunAndClosePreview()
|
||||||
{
|
{
|
||||||
if (NativeMethods.QuickLook.GetFocusedWindowType() ==
|
if (NativeMethods.QuickLook.GetFocusedWindowType() ==
|
||||||
NativeMethods.QuickLook.FocusedWindowType.Invalid)
|
NativeMethods.QuickLook.FocusedWindowType.Invalid)
|
||||||
@@ -69,25 +69,23 @@ namespace QuickLook
|
|||||||
|
|
||||||
StopFocusMonitor();
|
StopFocusMonitor();
|
||||||
_currentMainWindow.RunAndHide();
|
_currentMainWindow.RunAndHide();
|
||||||
if (kea != null)
|
|
||||||
kea.Handled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ClosePreview(KeyEventArgs kea = null)
|
internal void ClosePreview()
|
||||||
{
|
{
|
||||||
if (NativeMethods.QuickLook.GetFocusedWindowType() ==
|
if (NativeMethods.QuickLook.GetFocusedWindowType() ==
|
||||||
NativeMethods.QuickLook.FocusedWindowType.Invalid)
|
NativeMethods.QuickLook.FocusedWindowType.Invalid)
|
||||||
if (!WindowHelper.IsForegroundWindowBelongToSelf())
|
if (!WindowHelper.IsForegroundWindowBelongToSelf())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (_currentMainWindow.Visibility != Visibility.Visible)
|
||||||
|
return;
|
||||||
|
|
||||||
StopFocusMonitor();
|
StopFocusMonitor();
|
||||||
_currentMainWindow.BeginHide();
|
_currentMainWindow.BeginHide();
|
||||||
|
|
||||||
if (kea != null)
|
|
||||||
kea.Handled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TogglePreview(KeyEventArgs kea = null)
|
private void TogglePreview()
|
||||||
{
|
{
|
||||||
_lastSwitchTick = DateTime.Now.Ticks;
|
_lastSwitchTick = DateTime.Now.Ticks;
|
||||||
|
|
||||||
@@ -105,11 +103,9 @@ namespace QuickLook
|
|||||||
_path = NativeMethods.QuickLook.GetCurrentSelection();
|
_path = NativeMethods.QuickLook.GetCurrentSelection();
|
||||||
InvokeViewer();
|
InvokeViewer();
|
||||||
}
|
}
|
||||||
if (kea != null)
|
|
||||||
kea.Handled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchPreview(KeyEventArgs kea = null)
|
private void SwitchPreview()
|
||||||
{
|
{
|
||||||
if (_currentMainWindow.Visibility != Visibility.Visible)
|
if (_currentMainWindow.Visibility != Visibility.Visible)
|
||||||
return;
|
return;
|
||||||
@@ -123,8 +119,6 @@ namespace QuickLook
|
|||||||
_path = NativeMethods.QuickLook.GetCurrentSelection();
|
_path = NativeMethods.QuickLook.GetCurrentSelection();
|
||||||
|
|
||||||
InvokeViewer();
|
InvokeViewer();
|
||||||
if (kea != null)
|
|
||||||
kea.Handled = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchPreviewRemoteInvoke(HeartbeatEventArgs e)
|
private void SwitchPreviewRemoteInvoke(HeartbeatEventArgs e)
|
||||||
|
Reference in New Issue
Block a user