[gtk+/wip/baedert/drawing: 255/371] widget: Consider opacity when drawing toplevels



commit 361afa185aabb3c72d37156174e8ab69b8c3fe5a
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 c605361..e25255e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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;
 


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