Closed Bug 1639391 Opened 5 years ago Closed 5 years ago

Flashing of new windows is annoying during session restore

Categories

(Core :: Widget: Win32, defect)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
mozilla78
Tracking Status
firefox78 --- verified

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

Attachments

(1 file)

At

https://searchfox.org/mozilla-central/source/widget/windows/nsWindow.cpp#1618

We flicker a newly-shown window if it is unable to take focus. This is really annoying if it happens during session restore with multiple windows, because all the inactive windows that were opened by Firefox flicker and are left in that state indefinitely until the user clicks on every single window.

We probably should not do the flickering during session restore, since the user is expecting a whole bunch of new windows to appear anyway.

When we call nsWindow::Show but Firefox is not foreground, we show the window
and also flash it on the taskbar to get the user's attention.

This is really annoying when restoring a session with N windows, as the
user's taskbar ends up with all N of them stuck in a flashed state until the
user goes through and manually activates every single window.

There are several ways I thought of to address this, but I think the
simplest one is just to track whether or not we're in the middle of restoring a
session and skip flashing when we are doing so.

Assignee: nobody → aklotz
Status: NEW → ASSIGNED

I tested this with the above try build and it worked as expected.

Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f952cd9d37fb Do not call nsWindow::GetAttention for top-level windows being shown during session restore; r=mhowell
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Flags: qe-verify+

Reproduced the behavior on an old Nightly from 2020-05-19, verified that after restoring the session on Firefox 78.0 Release Candidates, the Fx icon does not flash in the taskbar on Windows 10 64bit.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: