Skip to content

bug: fix active window subscription on macOS and add selfListenOption#8

Merged
danim1130 merged 3 commits intomainfrom
bug/mac-os-initialization-and-self-listening
Feb 13, 2025
Merged

bug: fix active window subscription on macOS and add selfListenOption#8
danim1130 merged 3 commits intomainfrom
bug/mac-os-initialization-and-self-listening

Conversation

@kkerti
Copy link
Copy Markdown
Contributor

@kkerti kkerti commented Feb 12, 2025

Issue I.

Active window did not work on macOS, it only emitted the active window upon starting the package.
The issue was a missing initialization, with osx related init option.

From the node-active-window docs:

On some platforms (Linux) the library needs some initialization to be done. You must call this function before doing anything with the library regardless of the current platform.
Possible values for osxRunLoop:

  • false or not set (default): Don't run the run loop manually.
  • get: Run the run loop only for the getActiveWindow calls. Subscriptions will not work with this mode.
  • all: Run the run loop both for getActiveWindow calls and for subscriptions.

Issue II.

When clicking the Editor, then the active window info text gets overwritten with Editor itself. This is counterproductive when there is the Apply button.

Added the option to "Listen to Editor focus for Active window info", which is disabled (false) by default.

This does not disable the page change message activated when one of the page changes are Editor.

Test

  • should check on windows
  • should check on linux
  • should be checked on macos

@kkerti kkerti requested a review from danim1130 February 12, 2025 17:06
@kkerti
Copy link
Copy Markdown
Contributor Author

kkerti commented Feb 12, 2025

Ticket was created: Editor Roadmap (view)

Copy link
Copy Markdown
Collaborator

@danim1130 danim1130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread index.js Outdated
}

// When the active window is the editor itself, we don't want to send the active-info message to the editor
if (listenToSelf === false && title.includes("Editor")) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might filter out other applications, specify to "Grid Editor". Also, we might add "Electron" to the filter for when we run the Editor in dev mode

@kkerti
Copy link
Copy Markdown
Contributor Author

kkerti commented Feb 13, 2025

LGTM

Yes, thanks for the update.

@danim1130 danim1130 merged commit 62bce65 into main Feb 13, 2025
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