From: Dana Jansens Date: Tue, 29 May 2007 03:55:56 +0000 (+0000) Subject: set a OB_ICONIFY_ALPHA define in misc.h for the 3 places to all use X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=a71a98b667c298fef7895f4d9a07eccb06cc6090;p=chaz%2Fopenbox set a OB_ICONIFY_ALPHA define in misc.h for the 3 places to all use --- diff --git a/openbox/client_list_combined_menu.c b/openbox/client_list_combined_menu.c index b61efcef..cf85fd65 100644 --- a/openbox/client_list_combined_menu.c +++ b/openbox/client_list_combined_menu.c @@ -82,8 +82,8 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data) e->data.normal.icon_width = icon->width; e->data.normal.icon_height = icon->height; e->data.normal.icon_data = icon->data; - /* 7/16 opacity if iconic */ - e->data.normal.icon_alpha = c->iconic ? 0x70 : 0xff; + e->data.normal.icon_alpha = + c->iconic ? OB_ICONIC_ALPHA : 0xff; } } } diff --git a/openbox/client_list_menu.c b/openbox/client_list_menu.c index cc819875..25864684 100644 --- a/openbox/client_list_menu.c +++ b/openbox/client_list_menu.c @@ -84,8 +84,7 @@ static gboolean desk_menu_update(ObMenuFrame *frame, gpointer data) e->data.normal.icon_width = icon->width; e->data.normal.icon_height = icon->height; e->data.normal.icon_data = icon->data; - /* 7/16 opacity if iconic */ - e->data.normal.icon_alpha = c->iconic ? 0x70 : 0xff; + e->data.normal.icon_alpha = c->iconic ? OB_ICONIC_ALPHA : 0xff; } } } diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index b76793b1..8e58c935 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -421,9 +421,8 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c) icon = client_icon(target->client, innerw, innerh); p->a_icon->texture[0].data.rgba.width = icon->width; p->a_icon->texture[0].data.rgba.height = icon->height; - /* 7/16 alpha for iconic windows */ p->a_icon->texture[0].data.rgba.alpha = - target->client->iconic ? 0x70 : 0xff; + target->client->iconic ? OB_ICONIC_ALPHA : 0xff; p->a_icon->texture[0].data.rgba.data = icon->data; /* draw the icon */ diff --git a/openbox/misc.h b/openbox/misc.h index f55feed9..2b5584d7 100644 --- a/openbox/misc.h +++ b/openbox/misc.h @@ -19,6 +19,12 @@ #ifndef __ob__misc_h #define __ob__misc_h +/*! The alpha value to use for icons of iconified windows in various places + like the focus cycle popup and client list menus. + Give iconic windows 7/16 alpha. A little under 50%. + */ +#define OB_ICONIC_ALPHA 0x70 + typedef enum { OB_CURSOR_NONE,