Closed Bug 1491808 Opened Last year Closed Last year

[CSD][Wayland] Titlebar looks inactive when the main windows is dragged

Categories

(Core :: Widget: Gtk, defect)

Unspecified
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 2 open bugs, )

Details

(Keywords: regression)

Attachments

(2 files)

There's a small regression from Bug #1442755

When Firefox main window is dragged, the titlebar and elements there are painted as inactive.
This may need its own bug, but similarly in MATE the Firefox main window looks inactive when there is an OSD on the screen, such as when changing the volume or brightness using the keyboard buttons and when using Alt+Tab. Other apps (CSD and non-CSD) don't do this. I tried Xfce and Gnome, and it looks like it works OK there, so this may also be a MATE/Marco bug.
I can reproduce that on gnome-shell with Ubuntu Ambiance theme.
Assignee: nobody → stransky
(In reply to Alexander Browne from comment #1)
> This may need its own bug, but similarly in MATE the Firefox main window
> looks inactive when there is an OSD on the screen, such as when changing the
> volume or brightness using the keyboard buttons and when using Alt+Tab.
> Other apps (CSD and non-CSD) don't do this. I tried Xfce and Gnome, and it
> looks like it works OK there, so this may also be a MATE/Marco bug.

Firefox titlebar reacts on focus change so it may be caused by this.

Also, I can't reproduce this one with latest trunk, co closing for now.
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → WORKSFORME
I still see it in Ubuntu MATE with the latest nightly, but I think it's a MATE/Marco issue.
Hm, it's here again - Fedora 29/gnome-shell.
Status: RESOLVED → REOPENED
QA Contact: jmathies
Resolution: WORKSFORME → ---
I can reliably reproduce that on Wayland builds only.
FWIW it's fixed (as of a week ago I'd say) on Ubuntu MATE (18.10 at least) when using OSD.
(In reply to Alexander Browne from comment #7)
> FWIW it's fixed (as of a week ago I'd say) on Ubuntu MATE (18.10 at least)
> when using OSD.

Thanks, marking as Wayland only then as I can reproduce it only there.
Blocks: wayland
Status: REOPENED → NEW
Summary: [CSD] Titlebar looks inactive when the main windows is dragged → [CSD][Wayland] Titlebar looks inactive when the main windows is dragged
QA Contact: jmathies
Seems to be caused by focus-out even which is sent to main window when it's dragged. I see that on gnome-shell only, Weston doesn't send that.
Reported upstream as https://gitlab.gnome.org/GNOME/gtk/issues/1395
It's Mutter/Wayland specific issue, works fine in X11/Weston.
It's going to be addressed in Bug 1497534.
Status: NEW → RESOLVED
Closed: Last yearLast year
Resolution: --- → DUPLICATE
Duplicate of bug: 1497534
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
The bug is still here - it would need more investigation to fix that properly. Firefox 64 is not affected as Bug 1442755 was backed out (disabled) for Beta.
Status: REOPENED → ASSIGNED
Looks like the moz_gtk_header_bar_paint() may be called before the GTK_STATE_FLAG_BACKDROP state flag is set at mShell window - it's a race condition.
This is a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/1395
Gtk+ controls window active appearance by window-state-event signal
but gecko uses focus-in/out signals.

So we need to set the the titlebar state
when window-state-event comes *after* focus-in/out signals.
Titlebar (StyleAppearance::MozWindowTitlebar) style depends on toplevel window focus
and we need to redraw it when toplevel window focus changes.

Unfortunately according to https://gitlab.gnome.org/GNOME/gtk/issues/1395
the toplevel window focus can't be used here as we can have active but unfocused
toplevel window during drag & drop.

Gtk+ controls window active appearance by window-state-event signal
but gecko uses focus-in/out signals, so we need to repaint the titlebar
when window-state-event comes *after* focus-in/out signals.

We can't call mWidgetListener->WindowActivated() (and WindowDeactivated())
as it was already called from focus-in/out handlers before window-state-event.

Depends on D13051
Keywords: checkin-needed
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d1fc8c77ad7f
Listen on window-state-event to set titlebar active/inactive state, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/1a6f9251c41f
[Linux/CSD/Titlebar] Force toplevel window repaint when titlebar rendering is enabled and its state changes, r=bzbarsky
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d1fc8c77ad7f
https://hg.mozilla.org/mozilla-central/rev/1a6f9251c41f
Status: ASSIGNED → RESOLVED
Closed: Last yearLast year
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.