Merged
Conversation
instead so it can tolerate having no ClickThruBlocker installed.
After a long back and forth on the KSP forum with a CKAN expert, it seems I cannot put the kOS.netkan edit into the master branch until *after* I've cut a release from it or else CKAN's crawlerbot will incorrrectly associate that netkan change with the old previous release of kOS. (Thus making the old kOS say it's dependant on ClickThrougBlocker even though it's not.) That means I have to move the kOS.netkan edit into a separate PR that MUST come later after release (which feels very wrong).
In case someone installs kOS without using CKAN, they won't know about the ClickThroughBlocker requirement. This addes a popup on Start() that will tell them what's going on with ClickThroughBlocker and warn them that kOS won't work without it.
This was referenced Aug 8, 2020
Member
Author
|
REVERTED REVERTED REVERTED NOTE that although this PR is merged, I have had to revert the changes in this merge because I need to put kOS's window handling back to what it was before ClickThroughBlocker until it adds an API that's pending. |
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 edit makes kOS use the ClickThroughBlocker mod to handle its keyboard focus. ClickThroughBlocker is a nice mod, but it does require all mods to get on board and use it or else it starts acting very hostile toward the ones that don't, stealing their focus away. (Ironically it was causing clickthrough bugs when one of ClickThroughBlocker's windows was stacked underneath kOS's terminal window and stealing its focus.)
The only way to fix the fact that CTB windows were stealing focus from the kOS terminal even when they were stacked underneath it was to make the kOS terminal become a CTB window too so CTB knows it exists and can track its
rectand stacking order relative to the other CTB windows.To make this work, I spoke at length with @linuxgurugamer (maintainer of ClickThroughBlocker) on our Twitch channels and spoke of how moving kOS to using ClickThroughBlocker would change its behavior to focus-follows-mouse, which wasn't necessarily desired. At the time focus-follows-mouse was the only option ClickThroughBlocker had. He has since added the option to use click-to-focus depending on player preference. It is for THAT reason that this mod requires ClickThroughBloocker to be at least version 0.10. Old versions of ClickThroughBlocker will be missing the
focusFollowsClickboolean field that our code in kOS explicitly reads to change its own behavior. With that field missing, there would be errors.A NOTE ABOUT THIS PR and the kOS.netkan file:
This PR "wants" to edit the kOS.netkan file to reflect the new mod dependency on ClickThroughBlocker, but it can't. That had to be put in a separate PR ( To be called #2730 ). For reasons, see the edits to documentation files in PR #2730. )