Notify widgets of window focus change#2016
Open
ForLoveOfCats wants to merge 1 commit intolinebender:masterfrom
Open
Notify widgets of window focus change#2016ForLoveOfCats wants to merge 1 commit intolinebender:masterfrom
ForLoveOfCats wants to merge 1 commit intolinebender:masterfrom
Conversation
1434138 to
310c594
Compare
Collaborator
Author
|
Having now integrated this patch into my application I ran into an small sticking point of how widget focus change is a lifecycle event (and the fact that lifecycle event handling cannot mutate application outside submitting commands). As such it seems that there is probably more of a discussion to be had before deciding if notifying widgets of window focus change via an event is the right approach to expose window focus changes. If it is then there is the disconnect between it and widget focus handling which would be worth looking at as well. For the time being my application can continue to use this branch as I don't want to merge this as-is without some meaningful discussion. |
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.
Not entirely sure if this is exactly the best way to go about this. An alternative could be to track window focus in
WindowHandlebut adding this as a newEventwas by far and away the simplest (this patch is much smaller than I expected) and with the other window events there is existing precedence for approaching in this way.The use case for this is to be able to perform actions, like saving content, on window focus lost, which is exactly what I needed this for