Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window gets smaller and smaller on each close (might be only on extended monitor) #1330

Open
mtgtnt opened this issue Sep 22, 2023 · 6 comments

Comments

@mtgtnt
Copy link

mtgtnt commented Sep 22, 2023

Window does not open at the last saved size.

To Reproduce

Open Zulip, size it very large (not full screen). Close Zulip.
Open Zulip, it will now be smaller than what you closed it at. Close Zulip.
Open Zulip, it will now be even smaller.
Repeat as many times as you want.

If you monitor the window-state.json, you will see the size changing.

{"width":1913,"height":1043,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":1531,"height":835,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":1226,"height":669,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":982,"height":537,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":787,"height":430,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":630,"height":372,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
{"width":506,"height":372,"x":2053,"y":295,"displayBounds":{"x":2048,"y":288,"width":1920,"height":1080},"isMaximized":false,"isFullScreen":false}
  • Operating System: Windows 10
  • Zulip Desktop Version: 7.2

Im sure there is a pattern there that someone will see and know exactly what to fix. (hint: its reduced in size by 20% every time)

@andersk
Copy link
Member

andersk commented Sep 27, 2023

@mtgtnt Please note that that’s an issue in a third-party library that’s not affiliated with Zulip. They’re likely to be confused if you post comments about Zulip there.

@mtgtnt
Copy link
Author

mtgtnt commented Sep 27, 2023

Oops, thanks for the catch. I will paste it here:

I do have 2k main monitor, but Zulip is on an 1080 monitor, that does make the 20% reduction in size match the problem.

@mtgtnt
Copy link
Author

mtgtnt commented Sep 28, 2023

I took some time today to confirm that if I open and close on main monitor running at 2560x1440, Zulip will remain the correct size.
If I open and close on my second monitor running at 1920x1080, Zulip will reduce in size by 20%

@G0maa
Copy link

G0maa commented Mar 8, 2024

Hello @mtgtnt, is this issue still present?

I've been trying to see if it's reproducible on Linux (ZorinOS - Development Environment), I haven't been getting the same results:

  1. Different scaling & same resolution as in the mentioned issue, when Zulip is in full-screen mode it always starts on the main monitor. Even if I move it to the second monitor (and put it to full-screen mode).
  2. When it's windowed (on main or secondary monitor) the window itself "goes down" by a few tens of pixels, yet keeps the same ratio.
ezgif-3-f98f159573.mp4

I will be trying this on Windows 10 (non-development environment) shortly.
EDIT: I've been playing around with this on Windows for a bit, different scaling (125%, 100%), different resolution (1080p, 720p). I haven't been able to reproduce it.

@mtgtnt
Copy link
Author

mtgtnt commented Mar 8, 2024

Hi @G0maa

Yes, its very easily reproducible. Win10.

image
Monitor 1 (main):
image
Monitor 3:
image

Open Zulip and move it to Monitor 3. Make it close to full screen to see the resizing happen.
Quit Zulip. It will now remember the details in window-state.json with the correct sizes.
Open Zulip again. What is happening is that it will initially open on Monitor 1 (You may not see it happen), with the sizes saved in window-state.json.
It will then move it to Monitor 3, scaling the size down exactly 20% (difference in res between the monitors).
You can then Quit Zulip again. Remember its still on Monitor 3.
New sizes are saved to window-state.json.
Rinse and repeat until its VERY tiny window.

I just did this to confirm its still happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants