X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle_popup.c;h=4f697fdd335b1c397911209b73724107d78252cd;hb=73575c10ce3ede1637e4f959b56e1f7d5f110b91;hp=2ad786c06eb0c1c671dda1a4c86f0b55447d7fba;hpb=acafa38c8ea210b12ed92fc16281b915ab61542c;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 2ad786c0..4f697fdd 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -26,7 +26,7 @@ #include "config.h" #include "window.h" #include "event.h" -#include "render/render.h" +#include "obrender/render.h" #include #include @@ -124,9 +124,9 @@ void focus_cycle_popup_startup(gboolean reconfig) single_popup = icon_popup_new(); popup.obwin.type = OB_WINDOW_CLASS_INTERNAL; - popup.a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg); + popup.a_bg = RrAppearanceCopy(ob_rr_theme->osd_bg); popup.a_hilite_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label); - popup.a_text = RrAppearanceCopy(ob_rr_theme->a_unfocused_label); + popup.a_text = RrAppearanceCopy(ob_rr_theme->osd_unhilite_label); popup.a_icon = RrAppearanceCopy(ob_rr_theme->a_clear); popup.a_arrow = RrAppearanceCopy(ob_rr_theme->a_clear_tex); @@ -147,7 +147,7 @@ void focus_cycle_popup_startup(gboolean reconfig) RrAppearanceClearTextures(popup.a_arrow); popup.a_arrow->texture[0].type = RR_TEXTURE_MASK; popup.a_arrow->texture[0].data.mask.color = - ob_rr_theme->osd_color; + ob_rr_theme->osd_text_active_color; attrib.override_redirect = True; attrib.border_pixel=RrColorPixel(ob_rr_theme->osd_border_color); @@ -175,11 +175,13 @@ void focus_cycle_popup_startup(gboolean reconfig) /* create the hilite under the target icon */ { RrPixel32 color; + RrColor *tc; gint x, y, o; - color = ((ob_rr_theme->osd_color->r & 0xff) << RrDefaultRedOffset) + - ((ob_rr_theme->osd_color->g & 0xff) << RrDefaultGreenOffset) + - ((ob_rr_theme->osd_color->b & 0xff) << RrDefaultBlueOffset); + tc = ob_rr_theme->osd_text_active_color; + color = ((tc->r & 0xff) << RrDefaultRedOffset) + + ((tc->g & 0xff) << RrDefaultGreenOffset) + + ((tc->b & 0xff) << RrDefaultBlueOffset); o = 0; for (x = 0; x < HILITE_SIZE; x++) @@ -351,7 +353,7 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c) g_assert(mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS || mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST); - screen_area = screen_physical_area_primary(); + screen_area = screen_physical_area_primary(FALSE); /* get the outside margins */ RrMargins(p->a_bg, &ml, &mt, &mr, &mb); @@ -715,7 +717,7 @@ void focus_cycle_popup_single_show(struct _ObClient *c, g_assert(popup.targets == NULL); /* position the popup */ - a = screen_physical_area_primary(); + a = screen_physical_area_primary(FALSE); icon_popup_position(single_popup, CenterGravity, a->x + a->width / 2, a->y + a->height / 2); icon_popup_height(single_popup, POPUP_HEIGHT); @@ -735,3 +737,17 @@ void focus_cycle_popup_single_hide(void) { icon_popup_hide(single_popup); } + +gboolean focus_cycle_popup_is_showing(ObClient *client) +{ + if (popup.mapped) { + GList *it; + + for (it = popup.targets; it; it = g_list_next(it)) { + ObFocusCyclePopupTarget *t = it->data; + if (t->client == client) + return TRUE; + } + } + return FALSE; +}