Giter VIP home page Giter VIP logo

windows-virtualdesktopindicator's People

Contributors

flaflo avatar reserfodium avatar vklachkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

windows-virtualdesktopindicator's Issues

Marshalling as IInspectable is not supported in the .NET runtime

Hi
When checking IsPinnedApp of any app like notepad, word, excel etc then on the line GetAppUserModelId exception thrown: Marshalling as IInspectable is not supported in the .NET runtime

If I remove this line [InterfaceType(ComInterfaceType.InterfaceIsIInspectable)] at IApplicationView then Error received The method or operation is not implemented.

Checked on Windows Build: 19045, 22000, 22621
.Net 6.0

Option to show Desktop Name

It would be very nice to be able to see the desktop name, somehow.

Suggestion for how it could be shown, in order of (my) preference:

  • As an on screen tooltip/toast/notification when you switch desktop, which goes away on it's own in a second or two
  • In the taskbar: desktop number - desktop name, or just desktop name
  • as a tooltip on hover of the taskbar icon

Thanks for the super useful virtualdesktop indicator - makes virtual desktops on windows much more useable!

automatic quit(crash) after minutes

Ive downloaded the latest version , but it quit after minutes running .

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

Original Install Date:     3/8/2023, 7:35:43 AM
System Boot Time:          3/27/2023, 1:50:56 PM
System Manufacturer:       LENOVO
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 94 Stepping 1 GenuineIntel ~2208 Mhz
BIOS Version:              LENOVO FWKTBFA  , 6/23/2022
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC+08:00) Taipei
Total Physical Memory:     16,181 MB
Available Physical Memory: 5,283 MB
Virtual Memory: Max Size:  29,206 MB
Virtual Memory: Available: 4,258 MB
Virtual Memory: In Use:    24,948 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\WIN11-FROMMONTE
Hotfix(s):                 10 Hotfix(s) Installed.

Does not auto start at boot

I'd like to start by thanking you for this tool. I've setup for the app to start at startup. However, this is the error that I see in the event viewer:

Log Name:      Application
Source:        .NET Runtime
Date:          3/21/2022 11:23:08
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-KLDMP0F
Description:
Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
 ---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.File.WriteAllText(String path, String contents)
   at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
   at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
   at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
   --- End of inner exception stack trace ---
   at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
   at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
   at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
   at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2022-03-21T16:23:08.2517747Z" />
    <EventRecordID>39490</EventRecordID>
    <Correlation />
    <Execution ProcessID="21120" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-KLDMP0F</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
 ---&gt; System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.File.WriteAllText(String path, String contents)
   at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
   at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
   at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
   --- End of inner exception stack trace ---
   at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
   at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
   at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
   at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15
</Data>
  </EventData>
</Event>

This error log is followed by another error log:

Log Name:      Application
Source:        Application Error
Date:          3/21/2022 11:23:08
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-KLDMP0F
Description:
Faulting application name: VirtualDesktopIndicator.exe, version: 1.0.0.0, time stamp: 0x61735063
Faulting module name: KERNELBASE.dll, version: 10.0.22000.527, time stamp: 0x71a5cb5d
Exception code: 0xe0434352
Fault offset: 0x000000000004478c
Faulting process id: 0x5280
Faulting application start time: 0x01d83d3ff345669f
Faulting application path: C:\VirtualDesktopIndicator\VirtualDesktopIndicator.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: fd13f733-59bf-4c71-b5a3-6cdbb00460cd
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>100</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2022-03-21T16:23:08.4236494Z" />
    <EventRecordID>39491</EventRecordID>
    <Correlation />
    <Execution ProcessID="21268" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-KLDMP0F</Computer>
    <Security />
  </System>
  <EventData>
    <Data>VirtualDesktopIndicator.exe</Data>
    <Data>1.0.0.0</Data>
    <Data>61735063</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>10.0.22000.527</Data>
    <Data>71a5cb5d</Data>
    <Data>e0434352</Data>
    <Data>000000000004478c</Data>
    <Data>5280</Data>
    <Data>01d83d3ff345669f</Data>
    <Data>C:\VirtualDesktopIndicator\VirtualDesktopIndicator.exe</Data>
    <Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
    <Data>fd13f733-59bf-4c71-b5a3-6cdbb00460cd</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

Click icon to show the Task View screen

If clicking the virtualdesktop-indicator button did the same a clicking the Task View button - i.e. showed the built in Task View screen, then I could hide the Task View button and just have one desktop management button on the taskbar instead of two.

Arbitrary crashing issue

VDI has a tendency to crash without any error message and I highly suspect that this has something to do with the mouse scroll hook.

VDI needs to be debugged until it crashes again to discover the root cause of this.

icon isn't clear enough

in compare with esvres/vdn for example
desktop 1: acceptable
image

desktop 2,3: not bold enough, imho
image

Windows 11 21H2, .Net Core 6.0.4
Resolution: 2560x1440, Scale: 125%

Unhandled error after updating Windows 11 to 22H2

image


VirtualDesktopIndicator

VirtualDesktopIndicator encountered an unhandled error:
System.Runtime.InteropServices.COMException (0x800706F4): A null reference pointer was passed to the stub. (0x800706F4)

at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.IVirtualDesktopManagerInternal.GetDesktops(IntPtr hWnd, IObjectArray& desktops)

at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.DesktopManager.GetDesktopIndex(IVirtualDesktop desktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Native\VirtualDesktop\Implementation\VirtualDesktopWin11.cs:line 251

at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Native\VirtualDesktop\Implementation\VirtualDesktopWin11.cs:line 11

at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_CurrentVirtualDesktop() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 117

at VirtualDesktopIndicator.Components.DesktopNotifyIcon.OnTimerTick(Object sender, EventArgs e) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 260

OK

Program not usable as of Windows 11 v22H2

Just wanted to let users know that the project is not working anymore on Windows 11 version 22H2.

PS: I know this project seems to be abandoned, this message is only informative.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.