Repository navigation
Implement Single instance lock feature with passing arguments to initial instance - #2951
Conversation
…feature/open-files
…feature/open-files
…feature/open-files
|
Should be reviewed after #2918 merged |
|
@leaanthony Maybe we can take a look on this too? Also I have one more PR to enable custom url protocols support in wails as well 🚀 |
tmclane
left a comment
There was a problem hiding this comment.
I would recommend setting this to one because all that means is that if two messages are sent at the same time the second routine sending will block until the first message is processed. Setting it higher only ensures that the caller doesn't block on sending up to the limit.
stffabi
left a comment
There was a problem hiding this comment.
LGTM, that's an awesome PR thanks @APshenkin 🙏
I only added two minor comments regarding the Windows code.
|
@tmclane Make sense. Updated to set it to one @leaanthony @stffabi @tmclane |
|
Thanks for the awesome PR 🙏 |
|
Awesome, thanks for your time @APshenkin |
Description
Implements Single instance lock feature with additional passing arguments to initial instance #1351
There is implementation for single instance lock in V3 as plugin, but it doesn't allow to pass arguments of second instance to first one.
Now in V2 it's possible.
Also in plugin version there was option
ActivateAppOnSubsequentLaunch. I decided to not put it here. As now we have callbacks when second instance is called, I think it should be on "developer" side how to treat this. For example somebody will want to handle it differently depends on what type of arguments were passed.Also in addition Windows
runtime.Show()andruntime.WindowUnminimise()were modified for better handling different scenarios related to change focus of apps.You can see how it works here.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test repo is available here https://github.com/APshenkin/wails-open-file/tree/feature/single-lock
PR should be fetched and replace in go.mod should be adjusted
Test Configuration
Checklist:
website/src/pages/changelog.mdxwith details of this PR