Titlebar active appearance is opposite to what is expected when switching windows

VERIFIED FIXED in Firefox 65

Status

()

defect
P1
normal
VERIFIED FIXED
6 months ago
3 months ago

People

(Reporter: ke5trel, Assigned: stransky)

Tracking

(Blocks 1 bug, {regression})

65 Branch
mozilla65
Unspecified
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox63 unaffected, firefox64 unaffected, firefox65 verified)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 months ago
Switch focus between Firefox and another application window and observe the titlebar active appearance. Instead of gaining active appearance when the window becomes focused it switches to inactive appearance and vice versa when losing focus. Moving the mouse cursor over the titlebar updates the active appearance to the correct state.

Regressed by Bug 1497534

Ubuntu 18.10 with default Yaru theme.
(Reporter)

Updated

6 months ago
Flags: needinfo?(stransky)
(Assignee)

Comment 1

6 months ago
Okay, will look at it. I wonder if the backdrop state change is slower that the focus one and the titlebar widget is rendered before main window state is updated by Gtk.
Assignee: nobody → stransky
Flags: needinfo?(stransky)
Status: NEW → ASSIGNED
Priority: -- → P1
(Assignee)

Comment 2

6 months ago
Yes, I see that even on Fedora. When the application switch is fast, the firefox window is not repainted.

I suspect it's something with event routing, when I log events at nsWindow::OnWindowStateEvent() the focus is correctly received from Gtk but the titlebar does not react on that.
(Assignee)

Updated

6 months ago
Blocks: 1442755
(Assignee)

Updated

5 months ago
Keywords: checkin-needed

Comment 5

5 months ago
Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf1a01ae1faa
[Linux/Gtk] Use NS_DOCUMENT_STATE_WINDOW_INACTIVE to set titlebar state, r=jhorak
Keywords: checkin-needed

Comment 6

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bf1a01ae1faa
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Flags: qe-verify+

I've tried to reproduce this bug using Ubuntu 18.14 x64 but unfortunately I couldn't.
I've attached the screencast, maybe I'm doing something wrong?

Kestrel, can you please tell me if I'm doing the right thing or give me some more info?

Flags: needinfo?(ke5trel)

(In reply to Maria Berlinger [:maria_berlinger], Release Desktop QA from comment #8)

I've tried to reproduce this bug using Ubuntu 18.14 x64 but unfortunately I couldn't.
I've attached the screencast, maybe I'm doing something wrong?

Kestrel, can you please tell me if I'm doing the right thing or give me some more info?

You need to disable the native title bar in customize mode.

Flags: needinfo?(ke5trel) → needinfo?(maria.berlinger)
(Assignee)

Comment 10

3 months ago

(In reply to Maria Berlinger [:maria_berlinger], Release Desktop QA from comment #8)

I've tried to reproduce this bug using Ubuntu 18.14 x64 but unfortunately I
couldn't.
I've attached the screencast, maybe I'm doing something wrong?

Kestrel, can you please tell me if I'm doing the right thing or give me some
more info?

This should be already fixed in Firefox 64/65 so there's no recent version where you can see this bug unless you take a beta from past. Also the bug happened when you switched firefox and another application (terminal, gedit...) by ALT+TAB keys, not by mouse.

(Reporter)

Comment 11

3 months ago

(In reply to Martin Stránský [:stransky] from comment #10)

no recent version where you can see this bug unless you take a beta from past.

There is no Beta that had this, it only existed in Nightly.

Last bad Nightly:
https://ftp.mozilla.org/pub/firefox/nightly/2018/11/2018-11-20-10-00-45-mozilla-central/

First good Nightly:
https://ftp.mozilla.org/pub/firefox/nightly/2018/11/2018-11-20-22-01-33-mozilla-central/

Also the bug happened when you switched firefox and another application (terminal, gedit...) by ALT+TAB keys, not by mouse.

It happened for me regardless of the method of switching windows (keyboard and mouse) and between windows of the same Firefox instance. However if you click on the titlebar to switch focus it will appear active so it's better to click elsewhere in the window.

Thank you.
I've reproduce it.
This is verified fixed on Firefox 66.0b3 and Firefox 67.0a1 (20190128214724) using Ubuntu 18.04 x64.

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