iOS icon indicating copy to clipboard operation
iOS copied to clipboard

App does not remember the window size

Open domoritz opened this issue 3 years ago • 14 comments

Device model, version and app version

Software Version: macOS 11 App version: 2020.7 (1)

Describe the bug

The window does not remember the window size across closing/opening the app.

To Reproduce

  • Resize window
  • Close app
  • Open app again

Expected behavior

The window should remember its previous size.

domoritz avatar Sep 18 '20 22:09 domoritz

Do you have System Preferences > General > "Close windows when quitting an app" enabled?

zacwest avatar Sep 18 '20 22:09 zacwest

Yes, I do.

domoritz avatar Sep 18 '20 22:09 domoritz

Had the same behavior here since a few builds, I thought it was just me. It was always opening in the top left of the screen in like a 600px window.

That "Close windows when quitting an app" option was on for me (never changed it), after unchecking it it's now remembering the window size.

Also on macOS 11 / Big Sur PB.

SeanPM5 avatar Sep 18 '20 22:09 SeanPM5

Multi-window support means it's now persisting information about the windows when quitting, and if there are none, it doesn't have anything. I need to investigate if the Catalyst side of things will allow us to manually do so.

zacwest avatar Sep 18 '20 22:09 zacwest

The option "System Preferences > General > "Close windows when quitting an app"" is not longer there and the positions are not saved! This information is for Home Assistant Companion 2021.1 (1).

carsten-h avatar Dec 28 '20 00:12 carsten-h

image

zacwest avatar Dec 28 '20 00:12 zacwest

Oh, you are right, I totally read over "System"! Now it is working!

carsten-h avatar Dec 28 '20 00:12 carsten-h

I unchecked the system option "Close windows when quitting an app" and now when I quit the HA desktop app v2021.1.1 (9) it remembers its custom window size & position. However, when I click the top-left red circle close button it closes the app without quitting it AND THEN when I click the app again from the dock, its previous window size & position is gone and reset back to default.

wojciechpolak avatar Jan 19 '21 18:01 wojciechpolak

I have my app setup with the "Menu Bar" option. Whenever I close the window and then tap the menu bar icon, it goes back to the default small window size centered on my first display.

skrenes avatar Apr 02 '21 15:04 skrenes

"System Preferences > General > "Close windows when quitting an app" isn't the best way to handle this issue. It should remember the window size and position when closing the window irrespective of this setting.

matthew-larner avatar Aug 07 '21 06:08 matthew-larner

Perhaps, but a lot of this behavior comes from how Apple has decided Catalyst apps should work. It is possible to change this behavior by rewriting the app or substantially hackily overriding the default behavior (hence why this issue is still open) but this would be both a lot of work or an unsafe, short-term change due to the changes required.

zacwest avatar Aug 07 '21 14:08 zacwest

Please consider fixing this, it makes using this app so aggravating. Command + Q works to keep the window size the next time, but the red X resets it every single time. Maybe you can make the app quit upon pressing the red X so a Command + Q isn't required.

melyux avatar Dec 14 '21 01:12 melyux

Please consider fixing this, it makes using this app so aggravating. Command + Q works to keep the window size the next time, but the red X resets it every single time. Maybe you can make the app quit upon pressing the red X so a Command + Q isn't required.

You could use command + H. That does the job for me. The app window size won't change back to default after reopening, but the service remains running.

But in general the app should remember its window size like allmost every other app does.

Bat-Maniac avatar Jan 31 '22 09:01 Bat-Maniac

I used to use command+h, but the trouble is periodically pops up out of nowhere, especially when I'm opening/closing windows in another application. It's very bizarre. Even if it could be set to maximize on the display it's on, that would be a huge improvement.

skrenes avatar Jan 31 '22 14:01 skrenes

Is there really no fix for this after 2+ years? The lack of such a basic feature annoys me so much that I end up using HA in my browser.

1920x1200 avatar May 07 '23 22:05 1920x1200

First of all thank you for the app! It is a great addition! But I agree with all here:

But in general the app should remember its window size like allmost every other app does.

It is really annoying to resize the window everytime. I can't disable the option "Close windows when quitting an app" since other apps like the Terminal behave totally different then. Other than that the HA app is the only app which shows me this behaviour on my system. Is there a plannen fix for this?

AykutCevik avatar Jun 14 '23 07:06 AykutCevik

There seems to be an easy fix using SceneDelegate and GeometryPreferences.

It is described in these articles: [1] [2]

technotiger avatar Jan 06 '24 07:01 technotiger

There seems to be an easy fix using SceneDelegate and GeometryPreferences.

It is described in these articles: [1] [2]

Implemented the proposed solution: https://github.com/home-assistant/iOS/pull/2514

bgoncal avatar Jan 08 '24 10:01 bgoncal

@bgoncal I tested (with TestFlight build) the restore mac window size https://github.com/home-assistant/iOS/pull/2514 in combination with 'the red X' and Command + Q. This works very well with 1 Home Assistant server. However, with two Home Assistant servers (both open), only 1 will be reopened. Is this issue in scope for this GitHub issue?

cafferata avatar Jan 25 '24 14:01 cafferata

@bgoncal I tested (with TestFlight build) the restore mac window size #2514 in combination with 'the red X' and Command + Q. This works very well with 1 Home Assistant server. However, with two Home Assistant servers (both open), only 1 will be reopened. Is this issue in scope for this GitHub issue?

Can you open a new issue to keep track of this?

bgoncal avatar Jan 25 '24 15:01 bgoncal

Can you open a new issue to keep track of this?

Sure, no problem at all. ☺️

cafferata avatar Jan 25 '24 20:01 cafferata