[gtk+] Widget: Disable css box drawing for GtkWindow
- From: Matthias Clasen <matthiasc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] Widget: Disable css box drawing for GtkWindow
 
- Date: Thu, 20 Jul 2017 01:29:54 +0000 (UTC)
 
commit 4b75b20c349a9d513cb2423891204e6e8be32598
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 10:17:58 2017 +0200
    Widget: Disable css box drawing for GtkWindow
    
    Until we know how we solve that.
 gtk/gtkwidget.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bda6ec8..2e5203f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15365,17 +15365,19 @@ gtk_widget_snapshot (GtkWidget   *widget,
 
   _gtk_widget_get_allocation (widget, &allocation);
 
-  gtk_snapshot_offset (snapshot, margin.left, margin.top);
-  gtk_css_style_snapshot_background (style,
+  if (!GTK_IS_WINDOW (widget))
+    {
+      gtk_snapshot_offset (snapshot, margin.left, margin.top);
+      gtk_css_style_snapshot_background (style,
+                                         snapshot,
+                                         allocation.width - margin.left - margin.right,
+                                         allocation.height - margin.top - margin.bottom);
+      gtk_css_style_snapshot_border (style,
                                      snapshot,
                                      allocation.width - margin.left - margin.right,
                                      allocation.height - margin.top - margin.bottom);
-  gtk_css_style_snapshot_border (style,
-                                 snapshot,
-                                 allocation.width - margin.left - margin.right,
-                                 allocation.height - margin.top - margin.bottom);
-  gtk_snapshot_offset (snapshot, - margin.left, - margin.top);
-
+      gtk_snapshot_offset (snapshot, - margin.left, - margin.top);
+    }
 
   if (mode == RENDER_DRAW)
     {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]