]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
woa.. let you do mouse actions while in an interactive keyboard action, and let you...
[chaz/openbox] / openbox / focus.c
index e62b3dbdbfb02c9b7a8294b9104cadface570482..b1e312361152c733712a9d6d6dfa816e2bb962e5 100644 (file)
@@ -273,8 +273,6 @@ void focus_fallback(gboolean allow_refocus)
     */
     focus_nothing();
 
-    focus_client = NULL;
-
     if ((new = focus_fallback_target(allow_refocus, old)))
         client_focus(new);
 }
@@ -287,6 +285,8 @@ void focus_nothing()
         screen_install_colormap(NULL, TRUE);
     }
 
+    focus_client = NULL;
+
     /* when nothing will be focused, send focus to the backup target */
     XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
                    event_curtime);
@@ -304,13 +304,8 @@ static void popup_cycle(ObClient *c, gboolean show)
         a = screen_physical_area_monitor(0);
         icon_popup_position(focus_cycle_popup, CenterGravity,
                             a->x + a->width / 2, a->y + a->height / 2);
-/*        icon_popup_size(focus_cycle_popup, a->height/2, a->height/16);
-        icon_popup_show(focus_cycle_popup, c->title,
-                        client_icon(c, a->height/16, a->height/16));
-*/
-        /* XXX the size and the font extents need to be related on some level
-         */
-        icon_popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT);
+        icon_popup_width(focus_cycle_popup, MAX(a->width/3, POPUP_WIDTH));
+        icon_popup_height(focus_cycle_popup, POPUP_HEIGHT);
 
         /* use the transient's parent's title/icon */
         while (p->transient_for && p->transient_for != OB_TRAN_GROUP)
@@ -480,12 +475,13 @@ static gboolean valid_focus_target(ObClient *ft, gboolean dock_windows)
     else
         ok = (ft->type == OB_CLIENT_TYPE_NORMAL ||
               ft->type == OB_CLIENT_TYPE_DIALOG ||
-              (!client_has_group_siblings(ft) &&
+              (!client_has_application_group_siblings(ft) &&
                (ft->type == OB_CLIENT_TYPE_TOOLBAR ||
                 ft->type == OB_CLIENT_TYPE_MENU ||
                 ft->type == OB_CLIENT_TYPE_UTILITY)));
     ok = ok && (ft->can_focus || ft->focus_notify);
-    ok = ok && !ft->skip_pager;
+    if (!dock_windows) /* use dock windows that skip taskbar too */
+        ok = ok && !ft->skip_taskbar;
     ok = ok && (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL);
     ok = ok && ft == client_focus_target(ft);
     return ok;
This page took 0.021039 seconds and 4 git commands to generate.