Expose 'create' and 'remove' desktop#41
Open
TheSimpleZ wants to merge 1 commit intoCiantic:masterfrom
Open
Conversation
Owner
|
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. |
63dd2e8 to
03288dd
Compare
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. |
Owner
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
numberand switch to the desktop numberfallbackDesktop. Will return true upon success, otherwise false.I'm using these in my own project. Just thought it might be useful to others.