]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus_cycle_popup.c
Set up work for making a 3.5 prerelease.
[chaz/openbox] / openbox / focus_cycle_popup.c
index a60534add5bfb0c798215fdc46aabf2e5c730723..4f697fdd335b1c397911209b73724107d78252cd 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "window.h"
 #include "event.h"
-#include "render/render.h"
+#include "obrender/render.h"
 
 #include <X11/Xlib.h>
 #include <glib.h>
@@ -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++)
@@ -263,7 +265,8 @@ static void popup_setup(ObFocusCyclePopup *p, gboolean create_targets,
                                iconic_windows,
                                all_desktops,
                                dock_windows,
-                               desktop_windows))
+                               desktop_windows,
+                               FALSE))
         {
             gchar *text = popup_get_name(ft);
 
@@ -350,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_active();
+    screen_area = screen_physical_area_primary(FALSE);
 
     /* get the outside margins */
     RrMargins(p->a_bg, &ml, &mt, &mr, &mb);
@@ -714,7 +717,7 @@ void focus_cycle_popup_single_show(struct _ObClient *c,
         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);
@@ -734,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;
+}
This page took 0.029583 seconds and 4 git commands to generate.