all repos — openbox @ c726a1f709484da690a6fbcc7f6b8b4934660290

openbox fork - make it a bit more like ryudo

set the current theme in a root property
Dana Jansens danakj@orodu.net
commit

c726a1f709484da690a6fbcc7f6b8b4934660290

parent

9d8e1da42a40f886b0dd1a5f5b1fd79be59cd1e0

6 files changed, 10 insertions(+), 0 deletions(-)

jump to
M openbox/openbox.copenbox/openbox.c

@@ -273,6 +273,9 @@ ob_rr_theme = theme;

} 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) {
M openbox/prop.copenbox/prop.c

@@ -171,6 +171,7 @@ CREATE(esetrootid, "ESETROOT_PMAP_ID");

*/ 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");
M openbox/prop.hopenbox/prop.h

@@ -193,6 +193,7 @@

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;
M openbox/screen.copenbox/screen.c

@@ -294,6 +294,7 @@

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);
M render/theme.crender/theme.c

@@ -95,6 +95,7 @@ ps.inst = inst;

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 @@

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);
M render/theme.hrender/theme.h

@@ -230,6 +230,7 @@ RrAppearance *osd_hilite_fg; /* can never be parent relative */

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