widget: Consider opacity when drawing toplevels

This used to work in gtk3 and is used e.g. in the inspector when using
wayland.
This commit is contained in:
Timm Bäder
2017-06-17 14:13:29 +02:00
committed by Matthias Clasen
parent 63158fd3ff
commit 63ba8fa355

View File

@@ -15491,10 +15491,7 @@ gtk_widget_snapshot (GtkWidget *widget,
if (gtk_snapshot_clips_rect (snapshot, &offset_clip))
return;
if (_gtk_widget_is_toplevel (widget))
opacity = 1.0;
else
opacity = widget->priv->alpha / 255.0;
opacity = widget->priv->alpha / 255.0;
if (opacity <= 0.0)
return;