signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.6k stars 2.66k forks source link

[Signal Desktop / Windows] window position is not saved (correct) anymore #5894

Open ml17950 opened 2 years ago

ml17950 commented 2 years ago

Bug Description

Window position of the Windows Signal-Desktop App not saved (sometimes).

My Signal Desktop app ist placed on a second monitor, 99% height and approx 50% width of the screen size. When I close and reopen the app, the width ist ~40% and the height ~75%. If I change the the size in different sizes an restart the app, the size isn't the same after start.

I downloaded older versions and in <=5.36.0 everything is fine - since 5.37.0 (or something between 36 and 37) this behavior startet.

On the primary monitor there's no problem.

Steps to Reproduce

  1. open app
  2. place it on 2nd monitor
  3. resize the window (screenshot 1)
  4. close app
  5. reopen app (screenshot 2)

Screenshots

Image1 Image2

Platform Info

Signal Version: 5.40.1 (5.37.0 and up)

Operating System: Windows 10 Home / 21H2 / Build 19044.1645

indutny-signal commented 2 years ago

@ml17950 thanks for reporting it, and sorry for the inconvenience caused. Could you share your debug log, please?

ml17950 commented 2 years ago

@indutny-signal here you are

PC@Home: debuglog-pc1.txt PC@Work: debuglog-pc2.txt

indutny-signal commented 2 years ago

Sorry it took me awhile to get around to your report. First of all, are you still seeing this?

If yes - when you start Signal does it always start on the same monitor where you left it at before? We have limited amount of logging for window size changes, but it appears that at least in some cases the window was moved between screens upon restart?

Finally, is one of your monitors HiDPI and another not? Is it the same for both PC@Home and PC@Work?

ml17950 commented 2 years ago

The Signal client is always on the secondary display. Opens there, closing there. Same setup since version 5.x.

But were getting closer...

Work

Home

Test-Setup (workmate)

indutny-signal commented 2 years ago

Thank you for this information. We'll look into it.

scottnonnenberg-signal commented 2 years ago

https://github.com/electron/electron/issues/31999

scottnonnenberg-signal commented 2 years ago

@ml17950 Is this still happening for you on the most recent Signal Desktop release?

ml17950 commented 2 years ago

@scottnonnenberg-signal Yes, in 5.43.0 still happening.

Did some more test's... Start position is always on the secondary/left screen...

Case 1

State Top Left Width Height
Start 1 300px 0px 700px 600px
Start 2 300px 0px 700px 515px

Case 2

State Top Left Width Height
Start 1 300px 0px 1500px 600px
Start 2 300px 0px 1200px 515px

Case 3

State Top Left Width Height Screen
Start 1 50px 0px 1500px 600px secondary
Start 2 175px 185px 1200px 515px primary

Case 4

State Top Left Width Height
Start 1 50px 980px 900px 600px
Start 2 50px 980px 720px 515px

Case 5

State Top Left Width Height
Start 1 0px 980px 940px 1030px
Start 2 0px 980px 745px 825px

.... ?

scottnonnenberg-signal commented 2 years ago

Could we get a log from those startups?

ml17950 commented 2 years ago

Sure. Here are case 1,3,5. In Case 1 (Signal Version 5.45) it just got worse...

Case 1

State Top Left Width Height Screen
Start 1 300px 0px 700px 600px secondary
Start 2 300px 0px 700px 515px primary

Debuglog: case1.txt

Case 3

State Top Left Width Height Screen
Start 1 50px 0px 1500px 600px secondary
Start 2 175px 185px 1200px 515px primary

Debuglog: case3.txt

Case 5

State Top Left Width Height Screen
Start 1 0px 980px 940px 1030px secondary
Start 2 0px 980px 800px 820px secondary

Debuglog: case5.txt

ajspetner commented 2 years ago

Seems similar to #5298 - is it the same issue?

foozeNZ commented 1 year ago

I think it's related to the different scaling factors on the two monitors. My setup is primary screen 4k 125%, secondary 1080p 100%, primary screen on the left, secondary on the right. Signal is on the secondary screen , the top left position is always good on a restart but the size will get smaller each time I start it, so I suspect its shrinking 25% each time.

indutny-signal commented 1 year ago

This is indeed correct. Unfortunately it is a known electron bug, and electron team didn't fix it yet https://github.com/electron/electron/issues/31999