[gtk+/wip/baedert/drawing: 47/102] widget: Consider opacity when drawing toplevels



commit c1a2cd391814e0572986144cec977ba0f637e786
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]