]> Dogcows Code - chaz/openbox/commitdiff
set the current theme in a root property
authorDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 13:37:32 +0000 (13:37 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 13:37:32 +0000 (13:37 +0000)
openbox/openbox.c
openbox/prop.c
openbox/prop.h
openbox/screen.c
render/theme.c
render/theme.h

index ce92d5228ae196d99d914d6dacbb9f33877e5c9d..42a062bef5a85d2e12b7649361c20af921144bd2 100644 (file)
@@ -273,6 +273,9 @@ gint main(gint argc, gchar **argv)
                 }
                 if (ob_rr_theme == NULL)
                     ob_exit_with_error(_("Unable to load a theme."));
+
+                PROP_SETS(RootWindow(ob_display, ob_screen),
+                          ob_theme, theme->name);
             }
 
             if (reconfigure) {
index b0960bc198fa49cdcd992365c727a668cd9a9e1b..aec146d52933c1bb81a66cd18da3c46cd67a1e9a 100644 (file)
@@ -171,6 +171,7 @@ void prop_startup()
 */
 
     CREATE(openbox_pid, "_OPENBOX_PID");
+    CREATE(ob_theme, "_OB_THEME");
     CREATE(ob_wm_action_undecorate, "_OB_WM_ACTION_UNDECORATE");
     CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
     CREATE(ob_control, "_OB_CONTROL");
index 93821c87887bba57143406ef22b89dbf62d4dbdf..b9d6795eda1f296d4ca801714178542927111cc7 100644 (file)
@@ -193,6 +193,7 @@ typedef struct Atoms {
     Atom ob_wm_action_undecorate;
     Atom ob_wm_state_undecorated;
     Atom openbox_pid; /* this is depreecated in favour of ob_control */
+    Atom ob_theme;
     Atom ob_control;
 } Atoms;
 Atoms prop_atoms;
index 2ada74384de4ee3c54142a2af6e28b5960a76d6c..e5a9af3b809c86d642b5134c0519cfbde2b5e41c 100644 (file)
@@ -294,6 +294,7 @@ gboolean screen_annex()
     supported[i++] = prop_atoms.ob_wm_action_undecorate;
     supported[i++] = prop_atoms.ob_wm_state_undecorated;
     supported[i++] = prop_atoms.openbox_pid;
+    supported[i++] = prop_atoms.ob_theme;
     supported[i++] = prop_atoms.ob_control;
     g_assert(i == num_support);
 
index 97f5e1f5865df388219777d742fa36814b43e658..b4d869182daa23da08c16ca76fdd8532310aced9 100644 (file)
@@ -95,6 +95,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
 
     theme = g_new0(RrTheme, 1);
     theme->inst = inst;
+    theme->name = g_strdup(name);
 
     theme->a_disabled_focused_max = RrAppearanceNew(inst, 1);
     theme->a_disabled_unfocused_max = RrAppearanceNew(inst, 1);
@@ -1192,6 +1193,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
 void RrThemeFree(RrTheme *theme)
 {
     if (theme) {
+        g_free(theme->name);
+
         RrColorFree(theme->menu_border_color);
         RrColorFree(theme->frame_focused_border_color);
         RrColorFree(theme->frame_unfocused_border_color);
index 4e87fb12ed8401d58ec1980aeda1eafa2bf4e6c6..dda67071a91e24d3301493c5fd3d8ad11019d0a0 100644 (file)
@@ -230,6 +230,7 @@ struct _RrTheme {
     RrAppearance *osd_hilite_label; /* can be parent relative */
     RrAppearance *osd_unhilite_fg; /* can never be parent relative */
 
+    gchar *name;
 };
 
 /*! The font values are all optional. If a NULL is used for any of them, then
This page took 0.028941 seconds and 4 git commands to generate.