[gtk+/wip/baedert/drawing: 53/73] widget: Consider opacity when drawing toplevels



commit 7ed99fae7ca324984d61328fca62327a0ed97b6a
Author: Timm Bäder <mail baedert org>
Date:   Sat Jun 17 14:13:29 2017 +0200

    widget: Consider opacity when drawing toplevels
    
    This used to work in gtk3 and is used e.g. in the inspector when using
    wayland.

 gtk/gtkwidget.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d3aad7d..c4b6ae8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15483,10 +15483,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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]