Git Product home page Git Product logo

Comments (15)

MScholtes avatar MScholtes commented on May 24, 2024 5

In Windows 10 20H1 there are two additional COM interfaces present that expand the original ones with functions to support desktop naming:

Interface IVirtualDesktop2 (GUID {31EBDE3F-6EC3-4CBD-B9FB-0EF6D09B41F4}) with a new function you could declare as void GetName([MarshalAs(UnmanagedType.HString)] out string name);

Interface IVirtualDesktopManagerInternal2 (GUID {0F3A72B0-4566-487E-9A33-4ED302F6D6CE}) with a new function you could declare as void SetName(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string name);

With those declarations desktop naming can be implemented without the need to recycle explorer (investigated with the great OleViewDotNet).

from virtualdesktop.

mzomparelli avatar mzomparelli commented on May 24, 2024 4

If anyone is interested, this app does useful things including naming desktops.

https://github.com/mzomparelli/zVirtualDesktop

from virtualdesktop.

lutz avatar lutz commented on May 24, 2024 2

Currently with windows 2004 it is possible to get (not set) the name for the current virtual desktop. I wrote about it in a other github project.

from virtualdesktop.

MetaFight avatar MetaFight commented on May 24, 2024 1

@mzomparelli Sorry, but your self-promotion feels a bit heavy handed and in poor taste. Another project's issue tracker really isn't the place for ads.

from virtualdesktop.

ericnewton76 avatar ericnewton76 commented on May 24, 2024

This is probably not supported by the underlying api, and therefore would not be implemented here... sorry!

from virtualdesktop.

mzomparelli avatar mzomparelli commented on May 24, 2024

I don't even see the point of naming a desktop. The names are the numbers.

from virtualdesktop.

MetaFight avatar MetaFight commented on May 24, 2024

@moser96 I agree, naming them would be useful. The Windows 10 Feedback app already has a few entries for this suggestion. You should find them and upvote them.

from virtualdesktop.

mzomparelli avatar mzomparelli commented on May 24, 2024

The app was built from this project and specifically does what this issue is asking. I don’t see a problem with my comment.

from virtualdesktop.

Beej126 avatar Beej126 commented on May 24, 2024

@ericnewton76: This is probably not supported by the underlying api, and therefore would not be implemented here... sorry!

Windows 10 now supports this natively... will have to keep an eye out for if/where this gets exposed via apis

especially now that i've created this taskbar widget for myself based on this lib... it would be nice to integrate with this new native Windows behavior... i.e. dump my names list and register for name change notifications from Windows

@mzomparelli: I don't even see the point of naming a desktop. The names are the numbers.

seeing them titled at a glance helps me remember what the session is for ... hovering in the TaskView mode shows you the windows so you can get there pretty quick but the names are a nice little optimization... amazing msft applied the resources to make this happen out of all the priorities that fly

from virtualdesktop.

Beej126 avatar Beej126 commented on May 24, 2024

@lutz, thanks for sharing! this is good news. i will incorporate into my virtdesk taskbar widget project.

seeing that we can set the name via registry and recycle explorer.exe is not too bad... it means i can drop my internal list of names and base everything on that registry, yay! =)

please do include me if you find msft provides set name api at some point.

from virtualdesktop.

lutz avatar lutz commented on May 24, 2024

@Beej126 No problem currently it seems to be no way to set the name. You can manual edit the registry entry but this is not auto synced to the explorer (in my personal test). You can restart the Explorer but for me this is very hacky. I hope in future the windows api will extend for these functions. I don`t need the possibilty to set the name. I have a small dev project which is similar to your project. I want only a small name indicator. The rest of the functions (creating, switching and so on) i use the regular keybindings of windows (maybe i will add keybinding to CTRL+WIN+[Number] to switch to a specific desktop). If i have time to understand the code here for VirtualDesktop.CurrentChanged event i hope i can replace my global key hook.

@Grabacr07 Great work here πŸ‘

from virtualdesktop.

Beej126 avatar Beej126 commented on May 24, 2024

@lutz, that's awesome you independently picked up on the same general idea! deskband with name just feels so right since taskbar is the one static component during desktop changes... i couldn't resist implementing desktop change via dropdown in that space... it has quickly become instinctual which isn't always the case with new UI. i will build yours and check out UI =)

VirtualDesktop.CurrentChanged event is very straightforward (implementation example)

from virtualdesktop.

lutz avatar lutz commented on May 24, 2024

VirtualDesktop.CurrentChanged event is very straightforward (implementation example)

I meant the logic behind because i tied the dll from this project but ran into some issues like #44 and the event never raised when i comment the initialize methode out.

from virtualdesktop.

lutz avatar lutz commented on May 24, 2024

@MScholtes Big thanks for finding it out! This is a better way instead of look into the registry.

from virtualdesktop.

Beej126 avatar Beej126 commented on May 24, 2024

this is killer! thank you for sharing @MScholtes !

from virtualdesktop.

Related Issues (20)

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.