int ob_s_winfont_shadow_offset;
ObFont *ob_s_winfont;
/* style settings - masks */
-pixmap_mask *ob_s_max_mask;
-pixmap_mask *ob_s_icon_mask;
-pixmap_mask *ob_s_desk_mask;
-pixmap_mask *ob_s_close_mask;
+pixmap_mask *ob_s_max_pressed_mask;
+pixmap_mask *ob_s_max_unpressed_mask;
+pixmap_mask *ob_s_iconify_pressed_mask;
+pixmap_mask *ob_s_iconify_unpressed_mask;
+pixmap_mask *ob_s_desk_pressed_mask;
+pixmap_mask *ob_s_desk_unpressed_mask;
+pixmap_mask *ob_s_close_pressed_mask;
+pixmap_mask *ob_s_close_unpressed_mask;
/* global appearances */
Appearance *ob_a_focused_unpressed_max;
ob_s_title_unfocused_color = ob_s_title_focused_color =
ob_s_titlebut_unfocused_color = ob_s_titlebut_focused_color = NULL;
ob_s_winfont = NULL;
- ob_s_max_mask = ob_s_icon_mask = ob_s_desk_mask = ob_s_close_mask = NULL;
+ ob_s_max_pressed_mask = ob_s_max_unpressed_mask = NULL;
+ ob_s_iconify_pressed_mask = ob_s_iconify_unpressed_mask = NULL;
+ ob_s_desk_pressed_mask = ob_s_desk_unpressed_mask = NULL;
+ ob_s_close_pressed_mask = ob_s_close_unpressed_mask = NULL;
ob_a_focused_unpressed_max = appearance_new(Surface_Planar, 1);
ob_a_focused_pressed_max = appearance_new(Surface_Planar, 1);
if (ob_s_titlebut_focused_color != NULL)
color_free(ob_s_titlebut_focused_color);
- if (ob_s_max_mask != NULL) pixmap_mask_free(ob_s_max_mask);
- if (ob_s_desk_mask != NULL) pixmap_mask_free(ob_s_desk_mask);
- if (ob_s_icon_mask != NULL) pixmap_mask_free(ob_s_icon_mask);
- if (ob_s_close_mask != NULL) pixmap_mask_free(ob_s_close_mask);
+ if (ob_s_max_pressed_mask != NULL)
+ pixmap_mask_free(ob_s_max_pressed_mask);
+ if (ob_s_max_unpressed_mask != NULL)
+ pixmap_mask_free(ob_s_max_unpressed_mask);
+ if (ob_s_desk_pressed_mask != NULL)
+ pixmap_mask_free(ob_s_desk_pressed_mask);
+ if (ob_s_desk_unpressed_mask != NULL)
+ pixmap_mask_free(ob_s_desk_unpressed_mask);
+ if (ob_s_iconify_pressed_mask != NULL)
+ pixmap_mask_free(ob_s_iconify_pressed_mask);
+ if (ob_s_iconify_unpressed_mask != NULL)
+ pixmap_mask_free(ob_s_iconify_unpressed_mask);
+ if (ob_s_close_pressed_mask != NULL)
+ pixmap_mask_free(ob_s_close_pressed_mask);
+ if (ob_s_close_unpressed_mask != NULL)
+ pixmap_mask_free(ob_s_close_unpressed_mask);
if (ob_s_winfont != NULL) font_close(ob_s_winfont);
&ob_s_titlebut_unfocused_color))
ob_s_titlebut_unfocused_color = color_new(0xff, 0xff, 0xff);
- if (!read_mask(db, "window.button.max.mask", &ob_s_max_mask)) {
+ if (!read_mask(db, "window.button.max.mask", &ob_s_max_unpressed_mask)) {
char data[] = { 0x7c, 0x44, 0x47, 0x47, 0x7f, 0x1f, 0x1f };
- ob_s_max_mask = pixmap_mask_new(7, 7, data);
+ ob_s_max_unpressed_mask = pixmap_mask_new(7, 7, data);
}
- if (!read_mask(db, "window.button.icon.mask", &ob_s_icon_mask)) {
+ if (!read_mask(db, "window.button.max.pressed.mask",
+ &ob_s_max_pressed_mask)) {
+ ob_s_max_pressed_mask = pixmap_mask_copy(ob_s_max_unpressed_mask);
+ }
+
+ if (!read_mask(db, "window.button.icon.mask",
+ &ob_s_iconify_unpressed_mask)) {
char data[] = { 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3e };
- ob_s_icon_mask = pixmap_mask_new(7, 7, data);
+ ob_s_iconify_unpressed_mask = pixmap_mask_new(7, 7, data);
}
- if (!read_mask(db, "window.button.stick.mask", &ob_s_desk_mask)) {
+ if (!read_mask(db, "window.button.icon.pressed.mask",
+ &ob_s_iconify_pressed_mask)) {
+ ob_s_iconify_pressed_mask =
+ pixmap_mask_copy(ob_s_iconify_unpressed_mask);
+ }
+
+ if (!read_mask(db, "window.button.stick.mask",
+ &ob_s_desk_unpressed_mask)) {
char data[] = { 0x00, 0x36, 0x36, 0x00, 0x36, 0x36, 0x00 };
- ob_s_desk_mask = pixmap_mask_new(7, 7, data);
+ ob_s_desk_unpressed_mask = pixmap_mask_new(7, 7, data);
}
- if (!read_mask(db, "window.button.close.mask", &ob_s_close_mask)) {
+ if (!read_mask(db, "window.button.stick.pressed.mask",
+ &ob_s_desk_pressed_mask)) {
+ ob_s_desk_pressed_mask = pixmap_mask_copy(ob_s_desk_unpressed_mask);
+ }
+
+ if (!read_mask(db, "window.button.close.mask",
+ &ob_s_close_unpressed_mask)) {
char data[] = { 0x22, 0x77, 0x3e, 0x1c, 0x3e, 0x77, 0x22 };
- ob_s_close_mask = pixmap_mask_new(7, 7, data);
+ ob_s_close_unpressed_mask = pixmap_mask_new(7, 7, data);
+ }
+ if (!read_mask(db, "window.button.close.pressed.mask",
+ &ob_s_close_pressed_mask)) {
+ ob_s_close_pressed_mask = pixmap_mask_copy(ob_s_close_unpressed_mask);
}
if (!read_appearance(db, "window.title.focus", ob_a_focused_title))
ob_a_unfocused_unpressed_iconify->texture[0].type =
ob_a_unfocused_pressed_iconify->texture[0].type = Bitmask;
ob_a_focused_unpressed_max->texture[0].data.mask.mask =
- ob_a_focused_pressed_max->texture[0].data.mask.mask =
ob_a_unfocused_unpressed_max->texture[0].data.mask.mask =
- ob_a_unfocused_pressed_max->texture[0].data.mask.mask = ob_s_max_mask;
+ ob_s_max_unpressed_mask;
+ ob_a_focused_pressed_max->texture[0].data.mask.mask =
+ ob_a_unfocused_pressed_max->texture[0].data.mask.mask =
+ ob_s_max_pressed_mask;
ob_a_focused_unpressed_close->texture[0].data.mask.mask =
- ob_a_focused_pressed_close->texture[0].data.mask.mask =
- ob_a_unfocused_unpressed_close->texture[0].data.mask.mask =
+ ob_a_unfocused_unpressed_close->texture[0].data.mask.mask =
+ ob_s_close_unpressed_mask;
+ ob_a_focused_pressed_close->texture[0].data.mask.mask =
ob_a_unfocused_pressed_close->texture[0].data.mask.mask =
- ob_s_close_mask;
+ ob_s_close_pressed_mask;
ob_a_focused_unpressed_desk->texture[0].data.mask.mask =
- ob_a_focused_pressed_desk->texture[0].data.mask.mask =
ob_a_unfocused_unpressed_desk->texture[0].data.mask.mask =
+ ob_s_desk_unpressed_mask;
+ ob_a_focused_pressed_desk->texture[0].data.mask.mask =
ob_a_unfocused_pressed_desk->texture[0].data.mask.mask =
- ob_s_desk_mask;
+ ob_s_desk_pressed_mask;
ob_a_focused_unpressed_iconify->texture[0].data.mask.mask =
- ob_a_focused_pressed_iconify->texture[0].data.mask.mask =
ob_a_unfocused_unpressed_iconify->texture[0].data.mask.mask =
+ ob_s_iconify_unpressed_mask;
+ ob_a_focused_pressed_iconify->texture[0].data.mask.mask =
ob_a_unfocused_pressed_iconify->texture[0].data.mask.mask =
- ob_s_icon_mask;
+ ob_s_iconify_pressed_mask;
ob_a_focused_unpressed_max->texture[0].data.mask.color =
ob_a_focused_pressed_max->texture[0].data.mask.color =
ob_a_focused_unpressed_close->texture[0].data.mask.color =