all repos — openbox @ 5c95d2ffeabe45a6aacf37d0a1c1b0dfe83b2ba5

openbox fork - make it a bit more like ryudo

correctly show pressed state when pressing toggled buttons, bug #2311
Mikael Magnusson mikachu@comhem.se
commit

5c95d2ffeabe45a6aacf37d0a1c1b0dfe83b2ba5

parent

d2c98faf78cc691ae96e8ddcbb866a604a0ac9a5

3 files changed, 21 insertions(+), 3 deletions(-)

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

@@ -91,7 +91,9 @@ ob_rr_theme->a_disabled_focused_desk :

ob_rr_theme->a_disabled_unfocused_desk) : (self->focused ? (self->client->desktop == DESKTOP_ALL ? - ob_rr_theme->a_toggled_focused_desk : + (self->desk_press ? + ob_rr_theme->a_toggled_focused_pressed_desk : + ob_rr_theme->a_toggled_focused_desk) : (self->desk_press ? ob_rr_theme->a_focused_pressed_desk : (self->desk_hover ?

@@ -110,7 +112,9 @@ ob_rr_theme->a_disabled_focused_shade :

ob_rr_theme->a_disabled_unfocused_shade) : (self->focused ? (self->client->shaded ? - ob_rr_theme->a_toggled_focused_shade : + (self->shade_press ? + ob_rr_theme->a_toggled_focused_pressed_shade : + ob_rr_theme->a_toggled_focused_shade) : (self->shade_press ? ob_rr_theme->a_focused_pressed_shade : (self->shade_hover ?
M render/theme.crender/theme.c

@@ -591,6 +591,8 @@ theme->a_hover_unfocused_desk =

RrAppearanceCopy(theme->a_hover_unfocused_max); theme->a_toggled_focused_desk = RrAppearanceCopy(theme->a_toggled_focused_max); + theme->a_toggled_focused_pressed_desk = + RrAppearanceCopy(theme->a_focused_pressed_max); theme->a_toggled_unfocused_desk = RrAppearanceCopy(theme->a_toggled_unfocused_max); theme->a_unfocused_unpressed_desk =

@@ -611,6 +613,8 @@ theme->a_hover_unfocused_shade =

RrAppearanceCopy(theme->a_hover_unfocused_max); theme->a_toggled_focused_shade = RrAppearanceCopy(theme->a_toggled_focused_max); + theme->a_toggled_focused_pressed_shade = + RrAppearanceCopy(theme->a_focused_pressed_max); theme->a_toggled_unfocused_shade = RrAppearanceCopy(theme->a_toggled_unfocused_max); theme->a_unfocused_unpressed_shade =

@@ -718,6 +722,7 @@ theme->a_disabled_unfocused_desk->texture[0].type =

theme->a_hover_focused_desk->texture[0].type = theme->a_hover_unfocused_desk->texture[0].type = theme->a_toggled_focused_desk->texture[0].type = + theme->a_toggled_focused_pressed_desk->texture[0].type = theme->a_toggled_unfocused_desk->texture[0].type = theme->a_focused_unpressed_desk->texture[0].type = theme->a_focused_pressed_desk->texture[0].type =

@@ -728,6 +733,7 @@ theme->a_disabled_unfocused_shade->texture[0].type =

theme->a_hover_focused_shade->texture[0].type = theme->a_hover_unfocused_shade->texture[0].type = theme->a_toggled_focused_shade->texture[0].type = + theme->a_toggled_focused_pressed_shade->texture[0].type = theme->a_toggled_unfocused_shade->texture[0].type = theme->a_focused_unpressed_shade->texture[0].type = theme->a_focused_pressed_shade->texture[0].type =

@@ -784,6 +790,7 @@ theme->a_focused_unpressed_desk->texture[0].data.mask.mask =

theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask = theme->desk_mask; theme->a_toggled_focused_desk->texture[0].data.mask.mask = + theme->a_toggled_focused_pressed_desk->texture[0].data.mask.mask = theme->a_toggled_unfocused_desk->texture[0].data.mask.mask = theme->desk_toggled_mask; theme->a_disabled_focused_shade->texture[0].data.mask.mask =

@@ -799,6 +806,7 @@ theme->a_focused_unpressed_shade->texture[0].data.mask.mask =

theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask = theme->shade_mask; theme->a_toggled_focused_shade->texture[0].data.mask.mask = + theme->a_toggled_focused_pressed_shade->texture[0].data.mask.mask = theme->a_toggled_unfocused_shade->texture[0].data.mask.mask = theme->shade_toggled_mask; theme->a_disabled_focused_iconify->texture[0].data.mask.mask =

@@ -857,7 +865,9 @@ theme->titlebut_focused_unpressed_color;

theme->a_focused_pressed_max->texture[0].data.mask.color = theme->a_focused_pressed_close->texture[0].data.mask.color = theme->a_focused_pressed_desk->texture[0].data.mask.color = + theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color = theme->a_focused_pressed_shade->texture[0].data.mask.color = + theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color = theme->a_focused_pressed_iconify->texture[0].data.mask.color = theme->titlebut_focused_pressed_color; theme->a_unfocused_unpressed_max->texture[0].data.mask.color =

@@ -914,7 +924,7 @@ {

if (theme) { g_free(theme->path); g_free(theme->name); - + RrColorFree(theme->b_color); RrColorFree(theme->cb_unfocused_color); RrColorFree(theme->cb_focused_color);

@@ -990,6 +1000,7 @@ RrAppearanceFree(theme->a_disabled_unfocused_desk);

RrAppearanceFree(theme->a_hover_focused_desk); RrAppearanceFree(theme->a_hover_unfocused_desk); RrAppearanceFree(theme->a_toggled_focused_desk); + RrAppearanceFree(theme->a_toggled_focused_pressed_desk); RrAppearanceFree(theme->a_toggled_unfocused_desk); RrAppearanceFree(theme->a_focused_unpressed_desk); RrAppearanceFree(theme->a_focused_pressed_desk);

@@ -1000,6 +1011,7 @@ RrAppearanceFree(theme->a_disabled_unfocused_shade);

RrAppearanceFree(theme->a_hover_focused_shade); RrAppearanceFree(theme->a_hover_unfocused_shade); RrAppearanceFree(theme->a_toggled_focused_shade); + RrAppearanceFree(theme->a_toggled_focused_pressed_shade); RrAppearanceFree(theme->a_toggled_unfocused_shade); RrAppearanceFree(theme->a_focused_unpressed_shade); RrAppearanceFree(theme->a_focused_pressed_shade);
M render/theme.hrender/theme.h

@@ -131,6 +131,7 @@ RrAppearance *a_disabled_unfocused_desk;

RrAppearance *a_hover_focused_desk; RrAppearance *a_hover_unfocused_desk; RrAppearance *a_toggled_focused_desk; + RrAppearance *a_toggled_focused_pressed_desk; RrAppearance *a_toggled_unfocused_desk; RrAppearance *a_focused_unpressed_desk; RrAppearance *a_focused_pressed_desk;

@@ -141,6 +142,7 @@ RrAppearance *a_disabled_unfocused_shade;

RrAppearance *a_hover_focused_shade; RrAppearance *a_hover_unfocused_shade; RrAppearance *a_toggled_focused_shade; + RrAppearance *a_toggled_focused_pressed_shade; RrAppearance *a_toggled_unfocused_shade; RrAppearance *a_focused_unpressed_shade; RrAppearance *a_focused_pressed_shade;