I'm trying to find a way to make electron go from minimized, back to the last size of the open app - that is, simulating what happens when you click on a minimized app normally.
What I ideally want (but obviously doesn't work as it is not a function):
if (mainWindow.isMinimized()) {
mainWindow.unminimize()
}
What would also be acceptable, but I haven't been able to get to work:
if (mainWindow.isMinimized()) {
mainWindow.setSize(1100, 950)
}
What currently works, but doesn't bring me the desired result:
if (mainWindow.isMinimized()) {
mainWindow.maximize()
}
If anyone has a cool trick to simulate this function, or atleast a tip on how to go from minimized to a set screen size, you'd make my day! :)