Skip to content

Conversation

@JoelEinbinder
Copy link

Description of Change

There is some code in Chromium that checks the window level to determine if an unfocused window can receive mousemove events.

When Electron sets a window's parent, the level of both the parent and child are reset to NSWindowNormal. There is already some code to restore the parent's level. So I added some code to restore the child's level as well.

If the current behavior is the intended behavior, then an alternative patch could add a new window property that overrides the level check in Chromium. But this seemed simpler to me.

I couldn't find any tests for this area of the code. Happy to let someone with more Electron knowledge take over from here if much more is needed to get this landed.

Fixes #44150

Release Notes

Notes: Fixed MacOS windows losing their alwaysOnTop status when they were assigned a parent window.

@welcome
Copy link

welcome bot commented Oct 9, 2024

💖 Thanks for opening this pull request! 💖

Semantic PR titles

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Commit signing

This repo enforces commit signatures for all incoming PRs.
To sign your commits, see GitHub's documentation on Telling Git about your signing key.

PR tips

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Oct 9, 2024
@codebytere codebytere self-requested a review October 10, 2024 08:27
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Oct 10, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Oct 10, 2024
@codebytere codebytere added new-pr 🌱 PR opened recently target/31-x-y PR should also be added to the "31-x-y" branch. target/32-x-y PR should also be added to the "32-x-y" branch. target/33-x-y PR should also be added to the "33-x-y" branch. labels Oct 10, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Oct 10, 2024
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

@JoelEinbinder could you try to add a test for this? Beyond that LGTM!

@JoelEinbinder
Copy link
Author

@JoelEinbinder could you try to add a test for this? Beyond that LGTM!

I can write a test except I don't know where a test for this would live. I tried to look for examples but there was no test in the previous patches that restored the parents level (af4cf1e) and the one that added panels (21ef850).

@codebytere
Copy link
Member

@joel I'd say this should live in browser-window spec - you can just add a new describe. Also, can you please sign your commit?

@github-actions github-actions bot added the target/34-x-y PR should also be added to the "34-x-y" branch. label Oct 15, 2024
@codebytere
Copy link
Member

@JoelEinbinder If you rebase this and sign your commit, I can try to add a test myself

@JoelEinbinder
Copy link
Author

Sorry I've been far away from my computer that compiles Chromium. I'll be back in about a week and take another look at this.

@miniak miniak removed the target/31-x-y PR should also be added to the "31-x-y" branch. label Jan 13, 2025
@github-actions github-actions bot added the target/35-x-y PR should also be added to the "35-x-y" branch. label Jan 15, 2025
@codebytere
Copy link
Member

@JoelEinbinder do you still want to pursue this?

@github-actions github-actions bot added the target/36-x-y PR should also be added to the "36-x-y" branch. label Mar 5, 2025
@github-actions github-actions bot added the target/37-x-y PR should also be added to the "37-x-y" branch. label Apr 29, 2025
@github-actions github-actions bot added the target/38-x-y PR should also be added to the "38-x-y" branch. label Jun 24, 2025
@github-actions github-actions bot added the target/39-x-y PR should also be added to the "39-x-y" branch. label Sep 3, 2025
@jkleinsc
Copy link
Member

Closing due to inactivity.

@jkleinsc jkleinsc closed this Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/patch backwards-compatible bug fixes target/32-x-y PR should also be added to the "32-x-y" branch. target/33-x-y PR should also be added to the "33-x-y" branch. target/34-x-y PR should also be added to the "34-x-y" branch. target/35-x-y PR should also be added to the "35-x-y" branch. target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. target/39-x-y PR should also be added to the "39-x-y" branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unfocusable panel does not respond to hover if it has a parent

4 participants