mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-24 02:00:55 +08:00
Try to fix Excel focus issue
This commit is contained in:
@@ -36,8 +36,8 @@ namespace QuickLook.Plugin.IPreviewHandlers
|
||||
_control.Open(file);
|
||||
}), DispatcherPriority.Render);
|
||||
|
||||
//SetForegroundWindow(new WindowInteropHelper(context.ViewerWindow).Handle);
|
||||
//SetActiveWindow(presenter.Handle);
|
||||
SetForegroundWindow(new WindowInteropHelper(context.ViewerWindow).Handle);
|
||||
SetActiveWindow(presenter.Handle);
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
|
||||
@@ -37,8 +37,6 @@ namespace QuickLook.Helpers
|
||||
window.TransformToPixels(width, height,
|
||||
out pxWidth, out pxHeight);
|
||||
|
||||
Debug.WriteLine($"{pxLeft},{pxTop},{pxWidth},{pxHeight}");
|
||||
|
||||
var helper = new WindowInteropHelper(window);
|
||||
User32.MoveWindow(helper.Handle, pxLeft, pxTop, pxWidth, pxHeight, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user