FuPeiJiang / VD.ahk

Windows Virtual Desktop, AutoHotkey, Windows 11 support, Windows Server 2022, switch desktop, move window(wintitle) to current desktop; createDesktop, PinWindow, getCount, getDesktopNumOfWindow -> mute all windows in Virtual Desktop
MIT License
319 stars 45 forks source link

AppPinned相关方法缺少,给补上 #32

Open huo-feng-ding opened 1 year ago

huo-feng-ding commented 1 year ago

添加 VD.IsAppPinned(wintitle), VD.TogglePinApp(wintitle), VD.PinApp(wintitle), VD.UnPinApp(wintitle)这三个方法

FuPeiJiang commented 1 year ago

@huo-feng-ding Tim.exeC:\Program Files (x86)\Tencent\TIM\Bin\TIM.exe 吗?

huo-feng-ding commented 1 year ago

是的,是腾讯的tim;如果tim被pinApp或pinWindow之后,在切虚拟桌面的时候,tim即使之前不是active激活状态,切完虚拟桌面之后它就成了激活状态。这种情况下我不管切到哪个虚拟桌面,它总是处理激活窗口

FuPeiJiang commented 1 year ago

I need to read: How to get the z-order in windows? Updating the Z-Order of Many Windows Using Win32 API

because when a pinned window becomes the active window on 1 desktop, it suddenly becomes the active window on all desktops, you can see this in Win+Tab, it shows the Z-order of windows in every virtual desktop

windows itself (Ctrl+Win+Right) has this behavior, so we can't rely on winapi alone

FuPeiJiang commented 1 year ago

is there such a function as createViewOnAllDesktops, so we don't have to use PinApp ?

huo-feng-ding commented 1 year ago

对 TIM 的特殊处理,您的修改已经可以了,我将我改过的代码撤销改回来了

huo-feng-ding commented 1 year ago

is there such a function as createViewOnAllDesktops, so we don't have to use PinApp ?

PinApp相关方法之前您加上过,后来不知什么原因去掉了,想着您是遗忘了,我给加上了。不过这个方法也不怎么去用,只是想着加上之后功能更全更完美一些,呵呵