PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

PowerToys Peek

Open kxng0109 opened this issue 1 year ago • 5 comments

Microsoft PowerToys version

0.86.0

Installation method

Microsoft Store, PowerToys auto-update

Running as admin

No

Area(s) with issue?

Peek

Steps to reproduce

  • Open a file using Peek (ctrl + space)
  • Minimize the file
  • Select another file and open the file using Peek

✔️ Expected Behavior

I expected peek to un-minimize itself and show the file I opened.

❌ Actual Behavior

Instead it seems to stay minimized until I open it from my taskbar. I'm not sure if this is considered a bug, but usually when you open a file in an app, the app will "un-minimize" to show the file you opened using the app. But peek doesnt seem to do so.

Other Software

No response

kxng0109 avatar Nov 26 '24 12:11 kxng0109

We've found some similar issues:

  • #26335 , similarity score: 82%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

similar-issues-ai[bot] avatar Nov 26 '24 12:11 similar-issues-ai[bot]

Hi, I think it makes sense to restore the minimized window.

This is the current behavior when Peek is in background (not minimized) and Explorer in foreground, press Peek shortcut on another file, Peek is brought in foreground. Minimized should act the same.

davidegiacometti avatar Nov 27 '24 20:11 davidegiacometti

@asif4318 Your contribution is welcome and thank you for your work on this. Feel free to open a PR. If you have any further questions don't worry to ask them.

htcfreek avatar Dec 21 '24 17:12 htcfreek

I just took a deeper look at this issue.

If the peek shortcut is applied to another file while an existing peek window is minimized, the minimized window appropriately previews the new file. However, this minimized window is not brought into the foreground. Pressing the peek shortcut again closes the preview window entirely.

My plan to rectify this is to check if an existing Peek.UI window exists and if it does, bring that window into the foreground.

asif4318 avatar Dec 21 '24 20:12 asif4318

Took me a minute to understand how the Peek module works due to the lack of documentation. Once I understood it, this was a simple one line addition.

I would like guidance to see if an automated test could be added to test the new behavior.

asif4318 avatar Dec 22 '24 03:12 asif4318