fix: menu bar hiding on two setFullscreen(false)#45930
fix: menu bar hiding on two setFullscreen(false)#45930codebytere merged 2 commits intoelectron:mainfrom
setFullscreen(false)#45930Conversation
|
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe 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:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
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. |
1f26655 to
441610b
Compare
setFullscreen(false)setFullscreen(false)
| it('correctly remembers state prior to fullscreen change', async () => { | ||
| const w = new BrowserWindow({ show: false }); | ||
|
|
||
| // This should do nothing. |
There was a problem hiding this comment.
(nit) this comment and the ones below are clear from the context in this PR, but if I came across it cold when reading the .ts file I would find it a little confusing.
A little wordier, but maybe // This should be a no-op since this is already the window's current state
There was a problem hiding this comment.
Sounds good to me.
| // This should do nothing. | |
| // This should be a no-op since this is already the window's current state |
Edit: whoops, there is more such comments.
|
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 |
@codebytere is the primary on this code, so I'll defer to her on this question? |
441610b to
48d1c64
Compare
48d1c64 to
926d1c8
Compare
|
Hey, sorry for the delay. I rebased onto main. But I don't see anything in the previous CI run that points to a problem with my MR itself. |
|
@WofWca looks like there is code formatting issue found by our lint job that needs to be addressed: |
926d1c8 to
afa3c0f
Compare
|
@WofWca we require signed commits: https://www.electronjs.org/docs/latest/development/pull-requests#commit-signing. Can you sign your commits? |
afa3c0f to
9aaf4cb
Compare
|
@WofWca can you rebase with the latest from main? That should fix the lint job failing. |
9aaf4cb to
b344e80
Compare
`setFullscreen(false)` should do nothing when not already in fullscreen, but it hides the menu bar on Linux.
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. See the original bug in our project: deltachat/deltachat-desktop#4752.
b344e80 to
e7d614c
Compare
|
Ugh. What a mess. I have signed both of the commits now. |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "40-x-y", please check out #49994 |
|
I have automatically backported this PR to "39-x-y", please check out #49995 |
|
I have automatically backported this PR to "41-x-y", please check out #49996 |
Description of Change
This fixes the following bug on Linux (and maybe macOS):
win.setFullScreen(false).The menu bar will hide.
2025-03-08-L0hopNZIVy.mp4
See the original bug in our project: deltachat/deltachat-desktop#4752.
Checklist
npm testpasses[ ] relevant API documentation, tutorials, and examples are updated and follow the documentation style guidebool 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 suggestionRelease Notes
Notes: Fixed menu bar hiding after a call to
win.setFullScreen(false)when not in fullscreen on Linux.