Popup background is garbage on fallback GTK3 theme Raleigh

RESOLVED FIXED in Firefox 42

Status

()

Core
Widget: Gtk
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: acomminos, Assigned: acomminos)

Tracking

unspecified
mozilla43
Unspecified
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed, firefox43 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
The widget background for popups doesn't appear to be drawn when the GTK3 theme is Raleigh (garbage is displayed).
(Assignee)

Comment 1

3 years ago
This appears to be caused by the fact that if a popup menu's background is not specified, the toplevel popup backing the GtkMenu (_GtkMenuPrivate->toplevel) will end up showing a background for the menu. We should consider rendering a popup window behind the menu, like GTK does.
(Assignee)

Comment 2

3 years ago
Created attachment 8644578 [details] [diff] [review]
Draw a toplevel popup behind popup menus on GTK3.

This patch draws our generic popup toplevel behind popup menus. Thanks!
Attachment #8644578 - Flags: review?(karlt)
Comment on attachment 8644578 [details] [diff] [review]
Draw a toplevel popup behind popup menus on GTK3.

(In reply to Andrew Comminos [:acomminos] from comment #1)
> This appears to be caused by the fact that if a popup menu's background is
> not specified, the toplevel popup backing the GtkMenu
> (_GtkMenuPrivate->toplevel) will end up showing a background for the menu.
> We should consider rendering a popup window behind the menu, like GTK does.

>+    // Draw a backing toplevel. This fixes themes that don't provide a menu
>+    // background, and depend on the GtkMenu's implementation window to provide it.
>+    moz_gtk_window_paint(cr, rect, direction);

GtkMenu has its own child window, so I thought it shouldn't be possible to see any drawing on the (_GtkMenuPrivate->toplevel).  But maybe GDK client side child
windows can be translucent.

I wonder whether the background color comes from the 
gtk_style_context_set_background() which sets the GdkWindow background.
However, that would mean that the style context has a background that
gtk_render_background is not drawing, which seems unlikely.

Anyway, this seems to get the right results.
Attachment #8644578 - Flags: review?(karlt) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/12a12a5ca224
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Blocks: 1193807
Comment on attachment 8644578 [details] [diff] [review]
Draw a toplevel popup behind popup menus on GTK3.

Approval Request Comment
[Feature/regressing bug #]: GTK3 
[User impact if declined]: We are shipping GTK3 with 42.  This is one of the blocker bugs for that.
[Describe test coverage new/current, TreeHerder]:
[Risks and why]: 
[String/UUID change made/needed]:
Attachment #8644578 - Flags: approval-mozilla-aurora?
status-firefox42: --- → affected
Comment on attachment 8644578 [details] [diff] [review]
Draw a toplevel popup behind popup menus on GTK3.

If there is a chance to ship gtk3 in 42, let's take it.
Attachment #8644578 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.