[mutter/wip/fmuellner/theme-updates: 3/3] theme: Update style context hierarchy (again)



commit c2264e35e74a0cce8a4b5d31b6a519150004c451
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Jan 18 19:31:20 2016 +0100

    theme: Update style context hierarchy (again)
    
    GtkWindow actually uses two CSS nodes, 'window' and 'decoration'.
    Simulate that by using two separate style contexts for the frame.

 src/ui/theme-private.h |    1 +
 src/ui/theme.c         |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/theme-private.h b/src/ui/theme-private.h
index c27c3f9..3ebe06b 100644
--- a/src/ui/theme-private.h
+++ b/src/ui/theme-private.h
@@ -167,6 +167,7 @@ typedef enum
 
 typedef enum
 {
+  META_STYLE_ELEMENT_WINDOW,
   META_STYLE_ELEMENT_FRAME,
   META_STYLE_ELEMENT_TITLEBAR,
   META_STYLE_ELEMENT_TITLE,
diff --git a/src/ui/theme.c b/src/ui/theme.c
index b844e56..6b86593 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -1033,15 +1033,20 @@ meta_theme_create_style_info (GdkScreen   *screen,
   style_info = g_new0 (MetaStyleInfo, 1);
   style_info->refcount = 1;
 
-  style_info->styles[META_STYLE_ELEMENT_FRAME] =
+  style_info->styles[META_STYLE_ELEMENT_WINDOW] =
     create_style_context (META_TYPE_FRAMES,
                           NULL,
                           provider,
-                          "decoration",
+                          "window",
                           GTK_STYLE_CLASS_BACKGROUND,
-                          "window-frame",
                           "ssd",
                           NULL);
+  style_info->styles[META_STYLE_ELEMENT_FRAME] =
+    create_style_context (META_TYPE_FRAMES,
+                          style_info->styles[META_STYLE_ELEMENT_WINDOW],
+                          provider,
+                          "decoration",
+                          NULL);
   style_info->styles[META_STYLE_ELEMENT_TITLEBAR] =
     create_style_context (GTK_TYPE_HEADER_BAR,
                           style_info->styles[META_STYLE_ELEMENT_FRAME],


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