binaryfunt/electron-seamless-titlebar-tutorial

Maximise button doesn't work properly on Electron 6.0.0+

binaryfunt opened this issue · 11 comments

On clicking the maximize button, the window maximizes but the maximize button remains there, so you can't restore/unmaximize. This doesn't happen if you drag the title bar to the top of the screen to maximize the window - it works normally.

Windows 10
Electron 7.0.0

This appears to be due to electron/electron#19934, a problem with Electron >6.0.0

The maximize() function "maximizes" the window, but doesn't give it the maximized property.

I've updated the tutorial to recommend using Electron v5.0.11

Is this still a problem because I don't seem to have this issue at all.

@Toby56 Which version of Electron are you using? The window controls here still work for Electron <= 5.0.11

They work fine for me on Electron v7.0.0.
Never mind, it doesn't really matter anyway.

I found out I get this issue if I set the window to transparent! (But not if I set the background colour to #0000)

The behavior is very weird, I don't know if it's the same bug.

Just tried updating to Electron 8.2.1 and cannot reproduce the bug. I can't say all users won't experience the bug, however. But it might be worth releasing the restriction on the electron version.

Yes! Please do! Anyway, soon if you want I've got a massive pull request to make. It changes/improves basically everything about this tutorial. It's kinda hard to pr specific changes though so idk

Fixed (hopefully)

That's good, for me it's never been a problem. Once I did manage to replicate this even in a new electron but I don't remember how, probably it wasn't anything important

fe commented

if it still doesn't work
mainWindow.setRisizable(true);
check if the value is true

v8.2.3