Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose 'create' and 'remove' desktop #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheSimpleZ
Copy link

@TheSimpleZ TheSimpleZ commented May 16, 2021

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.

@TheSimpleZ TheSimpleZ changed the title Expose 'create' and 'remove' dekstop Expose 'create' and 'remove' desktop May 16, 2021
@Ciantic
Copy link
Owner

Ciantic commented May 16, 2021

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.

@TheSimpleZ TheSimpleZ force-pushed the master branch 4 times, most recently from 63dd2e8 to 03288dd Compare May 16, 2021 18:52
@TheSimpleZ
Copy link
Author

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.

@Ciantic
Copy link
Owner

Ciantic commented May 16, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants