#include "config.h"
#include "window.h"
#include "event.h"
-#include "render/render.h"
+#include "obrender/render.h"
#include <X11/Xlib.h>
#include <glib.h>
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);
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);
/* 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++)
for (it = g_list_last(focus_order); it; it = g_list_previous(it)) {
ObClient *ft = it->data;
- if (focus_valid_target(ft, TRUE,
+ if (focus_valid_target(ft, screen_desktop, TRUE,
iconic_windows,
all_desktops,
dock_windows,
- desktop_windows))
+ desktop_windows,
+ FALSE))
{
gchar *text = popup_get_name(ft);
g_assert(mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ||
mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST);
- screen_area = screen_physical_area_active();
+ screen_area = screen_physical_area_primary(FALSE);
/* get the outside margins */
RrMargins(p->a_bg, &ml, &mt, &mr, &mb);
g_assert(popup.targets == NULL);
/* position the popup */
- a = screen_physical_area_active();
+ 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);
{
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;
+}