Open Bug 1918296 Opened 1 year ago Updated 4 days ago

Previously maximised window is smaller when restored from Windows system tray

Categories

(Thunderbird :: OS Integration, defect)

Thunderbird 128
Unspecified
Windows
defect

Tracking

(thunderbird_esr153 affected)

Tracking Status
thunderbird_esr153 --- affected

People

(Reporter: Alexander, Unassigned)

References

Details

Steps to reproduce:

The issue is intermittent, although happening daily. I found no sure way to reproduce it with an algorithm of steps. I can only describe what happens, see below.

Actual results:

I use Windows 10 Professional. The issue is about the Windows system tray.

I always keep the TB window maximised. Whenever I do not need it, I minimise it into the system tray by clicking the "-" symbol on the top right corner of the window. Usually, when restoring the window again from the system tray by mouse click on the tray icon, the window is again correctly displayed in maximised state. But it happens several times per day, that restoring the window results in a non-maximised window, forcing me to click the rectangular maximise symbole on the top right window corner to again get the window back to its maximised state.

I am unsure if it is related to the issue or important for reproducing it, but I use the built-in virtual desktop feature of Windows 10, i.e. instead of multiple monitors I use multiple (usually 4) virtual desktops between which I switch using keyboard shortcuts.

Expected results:

Restoring the TB window from the system tray should always restore it to the same state and size as before, i.e. e.g. maximised if it was maximised pre-tray and non-maximised if it was non-maximised pre-tray. This should work consistently, no matter which virtual desktop I happen to be on when restoring the window.

Update: This is still happening on a daily basis in 140.2.1esr (64-Bit).

Oh, and I forgot to mention that I have upgraded to Windows 11 long ago, so it is not a Windows 10 issue.

On 140 ESR and on Windows 11 (after upgrading from 10), the same thing still happens.

Duplicate of this bug: 1977643
Status: UNCONFIRMED → NEW
Ever confirmed: true

To avoid it being overlooked, some additional information from duplicate bug 1977643 which I can confirm (because I use it all the time) and forgot to mention in my bug description here:

Workaround: If you click the taskbar icon instead of the system tray icon, Thunderbird always retains its window size.

One question when debugging this is: Why is the behaviour different between system try and task bar icons?

Another question is: Why is the issue intermittent and defies easy reproducibility? Is there a timing issue? Some kind of race condition? Is it related to the Windows multiple desktop feature which I use? Not sure if the author of the duplicate, Russ Hansen, also uses multiple desktops.

Same things happens to me, on a daily basis. It happened on Windows 10, and now on Windows 11 on a new computer, so I don't think it's OS related, but a bug on Thunderbird side. I also think it's time related, because when it happens I of course have to maximize the window, and after that I can click on the tray icon thousand of times and it will open Thunderbird maximized every time. But if I give it some time, maybe half an hour or something it will happen again.

(In reply to Alexander Kriegisch from comment #5)

To avoid it being overlooked, some additional information from duplicate bug 1977643 which I can confirm (because I use it all the time) and forgot to mention in my bug description here:

Workaround: If you click the taskbar icon instead of the system tray icon, Thunderbird always retains its window size.

One question when debugging this is: Why is the behaviour different between system try and task bar icons?

Another question is: Why is the issue intermittent and defies easy reproducibility? Is there a timing issue? Some kind of race condition? Is it related to the Windows multiple desktop feature which I use? Not sure if the author of the duplicate, Russ Hansen, also uses multiple desktops.

(Dupe author here)

It's a good question, and it doesn't make sense. The tray icon must be using some other api call to open Thunderbird than simply clicking the taskbar icon. And clicking the taskbar always works 100%.

As for multiple desktops, I don't use multiple desktops. I do, however, have multiple monitors. Thunderbird is always on my primary monitor.

And if we have a wish list here, I would like the tray icon to remain present even when the main window is open, so the system tray doesn't jump around. Outlook behaves this way. Simply setting a persistent state for the tray icon may simplify whatever call it is making to open the window and resolve this. I suspect it's this behavior which is changing what kind of api call it is making.

Also, I checked in Outlook. Here are some other behaviors. The "active indicator" remains under the taskbar icon even when it is minimized, whereas with Thunderbird, the window is marked as inactive. If you click on the Outlook tray icon once, it restores the active minimized window. If you click twice, it restores it from maximized to a normal window. If you click a third time, nothing happens.

I think there may be some clues there in the way Outlook behaves that directly relates to the tray icon api. I think Thunderbird needs to remain open and minimized. I think the tray icon needs to stay there. I think the tray icon api is responsible for whatever is happening because Thunderbird is showing as closed. I think normal tray icon behavior can return the window to a restored state.

Somewhere in that mess lies the answer. Unfortunately, I can only give circumstantial information. I can't actually fix it and do a pull. I think the tray icon api is being used improperly here, probably in some undocumented way because Microsoft.

Magnus Melin [:mkmelin]
Updated • 4 days ago
Status: UNCONFIRMED → NEW

Let's move confirmed bugs to a component ... a guess if necessary

Component: Untriaged → OS Integration

Oh, and I forgot to mention that I have upgraded to Windows 11 long ago, so it is not a Windows 10 issue.

OS: Unspecified → Windows 11

Update: This is still happening on a daily basis in 153.0.2esr (64-Bit).

OS: Windows 11 → Windows

(In reply to Alexander Kriegisch from comment #5)

To avoid it being overlooked, some additional information from duplicate bug 1977643 which I can confirm (because I use it all the time) and forgot to mention in my bug description here:

Workaround: If you click the taskbar icon instead of the system tray icon, Thunderbird always retains its window size.

One question when debugging this is: Why is the behaviour different between system try and task bar icons?

Another question is: Why is the issue intermittent and defies easy reproducibility? Is there a timing issue? Some kind of race condition? Is it related to the Windows multiple desktop feature which I use? Not sure if the author of the duplicate, Russ Hansen, also uses multiple desktops.

I don't use multiple desktops, but I have a multi-monitor setup in Extend Display mode on Windows 11.

The trick of clicking on the taskbar icon instead of the system tray icon still always works, and the system tray bug is just as erratic. 153.0.1.

You need to log in before you can comment on or make changes to this bug.