Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.66k stars 301 forks source link

BUG: Windows Walker plugin switch involuntary to other virtual desktop. #2253

Open Base-115 opened 1 year ago

Base-115 commented 1 year ago

Checks

Problem Description

First the all, make sure to have install Windows Walker plugin; also, confirm the checkbox to the option "Search Window Across All Desktop" is fill from the plugins settings, in:

"Flow Launcher Settings" > Plugins > Windows Walker


When use Windows Walker to switch to another windows from other virtual desktop to the first time, all seem right. But, from the second time and so on, when you invoke Flow Launcher again, it will always switch to virtual desktop that you invoke it previously.


This bug don't make Flow Launcher impossible to use, but it is really annoying the "ghost" changing between virtual dekstops.

To Reproduce

  1. Make sure to have Windows Walker installed.
  2. In "Flow Launcher Settings" > Plugins > Windows Walker, confirm the checkbox "Search Window Across All Desktop" is fill.
  3. Create one or more Virtual Desktops (default keyboard shortcut "Windows Key + Ctrl + D").
  4. Open one software with windows in the new(s) Virtual Desktop(s).
  5. Invoke the Flow Launcher and use Windows Walker to go to the windows from different Virtual Desktop.
  6. In the other Virtual Desktop, invoke again Flow Launcher.

Screenshots

https://github.com/Flow-Launcher/Flow.Launcher/assets/112908515/d0ab6967-e74a-4c1b-9a6c-b72381d9c6fb

Flow Launcher Version

1.16.0

Windows Build Number

Microsoft Windows [Version 10.0.19045.3208]

Error Log

2023-07-21.txt

jjw24 commented 1 year ago

Can you test, before your step 6, after you switched to the VD, click on the screen any area first then invoke flow.

Play around with the search window positioning see if that makes a difference.

Base-115 commented 1 year ago

Hi jj.

I tried to make this, but the odd behavior keeps happening.

I realised that if you switch to another Virtual Desktop with keyboard shortcut (Windows Key + Ctrl + Left or Right Arrow) or by Task View Button, you can "transfer" this auto swap between Virtual Desktops.

I mean, if it switches to Virtual Desktop 2, now it will switch to Virtual Desktop 1.


Trying the solution and "transferring" the behavior to another desktop.

https://github.com/Flow-Launcher/Flow.Launcher/assets/112908515/58e7720d-f6c7-45e6-b8c8-b51fe0fcd4dc

jjw24 commented 1 year ago

I can replicate the issue, but not sure if it's from WindowWalker or Flow itself.

Base-115 commented 1 year ago

I got replicate the same bug behavior in my Laptop with Windows 10 installed.

It's annoying if you need switch to windows between virtual desktops. I rarely use more than 1 virtual desktop, so it doesn't trouble me so much.

Do I send the Flow Launcher log file would be useful to identify this bug?

jjw24 commented 1 year ago

No need for log since the issue can be replicated and easily. When I get sometime I will have a look. This feature was introduced by WindowWalker plugin in its recent release, and triggering flow on its own does show up on the right VD, so might be something with the plugin itself.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

guntern commented 9 months ago

I also encounter this issue. And it looks like that once you select the entry from Window Walker and get changed to the other desktop, the flow launcher window itself is not correctly "deactivated" (sorry for the lack of a technically correct term). So upon the next invocation of flow launcher, it is still attached to the old desktop and you get forced back there.

guntern commented 4 months ago

Hi, was wondering how things are going with this issue. Or might it better live here: https://github.com/taooceros/Flow.Plugin.WindowWalker

taooceros commented 4 months ago

This is an unfortunate issue. There's a previous patch that try's to fix it, but brings many compatibility issues across different versions of windows as the api to move app around window is unstable (and relatively low level).

If anyone would like to help with dynamically patch the right api use I would be greatly appreciated.

taooceros commented 4 months ago

Maybe you can manually set flow to appear in all virtual desktop to amortize the issue (didn't try myself so don't guarantee to work).

guntern commented 4 months ago

@taooceros Can you point me to the place, where this would have to happen? Then I could check if I would be capable of solving it.

taooceros commented 4 months ago

You may check the code related to IVirtualDesktopManagerInternal. https://github.com/taooceros/Flow.Plugin.WindowWalker/blob/737c981e9b439495f146c9f5262f00bc07217d5e/Components/VirtualDesktopManager.cs#L37