electron icon indicating copy to clipboard operation
electron copied to clipboard

fix: menu bar hiding on two `setFullscreen(false)`

Open WofWca opened this issue 10 months ago • 4 comments

Description of Change

This fixes the following bug on Linux (and maybe macOS):

  1. Create a window with a menu bar.
  2. Call win.setFullScreen(false).

The menu bar will hide.

https://github.com/user-attachments/assets/347b542a-02ba-4c1a-a057-683fe84d6c94

See the original bug in our project: https://github.com/deltachat/deltachat-desktop/issues/4752.

Checklist


  • [ ] Please check if bool leaving_fullscreen = IsFullscreen() && !fullscreen; makes sense on all platforms. Frankly, I don't know what I'm doing, so perhaps take this MR as a hand-wavy suggestion

Release Notes

Notes: Fixed menu bar hiding after a call to win.setFullScreen(false) when not in fullscreen on Linux.

WofWca avatar Mar 08 '25 16:03 WofWca

💖 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.

welcome[bot] avatar Mar 08 '25 16:03 welcome[bot]

So, @ckerr , do you think that this is the right approach? Have you considered whether this can break stuff? Because as I said, I have no idea what I'm doing.

If the comments is the only remaining issue, I'll come back to this in a few days

WofWca avatar Oct 31 '25 17:10 WofWca

So, @ckerr , do you think that this is the right approach? Have you considered whether this can break stuff? Because as I said, I have no idea what I'm doing.

@codebytere is the primary on this code, so I'll defer to her on this question?

ckerr avatar Oct 31 '25 18:10 ckerr

@WofWca could you rebase this on top of main to try & make CI happy?

@jkleinsc does https://github.com/electron/electron/pull/45930/commits/48d1c64f3fffd879d767386db57e17a9b2423730 address your change request?

ckerr avatar Nov 25 '25 15:11 ckerr