VirtualDesktopAccessor
VirtualDesktopAccessor copied to clipboard
Expose 'create' and 'remove' desktop
This PR exposes 2 new methods.
int CreateVirtualDesktop()
Create a new desktop and return the desktop number. If it fails, it returns -1.
int RemoveVirtualDesktop(int number, int fallbackDesktop)
Will remove the desktop with the number number and switch to the desktop number fallbackDesktop. Will return true upon success, otherwise false.
I'm using these in my own project. Just thought it might be useful to others.
Yes, someone might see these useful. I have implemented these already in my Rust version. I plan to deprecate the C++ part and create the DLL directly from Rust.
Amazing! What's the status on that .dll? I'm also quite interested in renaming desktops and was planning on implementing it here. But I see that you already have it in Rust.
@TheSimpleZ I just started the DLL part. It's basically matter of re-exporting those with cdylib, as I have the functions already there.
DLL made with Rust is also great as it doesn't depend on msvcrt anymore either which makes it a bit nicer to use (but the DLL is a bit bigger 200kB). But I've always hated that users must install msvcrt library to use Visual Studio C++ DLLs.