X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=c9c1895539d101b1e31bbe416ea921eb5c71c758;hb=1d9c0e8b87e853a49dadc90c4c1ae12e77c63360;hp=4c663c3f124eabd30a223489263f1f24b6eb2120;hpb=9f11e2af6b230c168814c362bd1647c481e0330a;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 4c663c3f..c9c18955 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -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) @@ -323,10 +318,10 @@ static void popup_cycle(ObClient *c, gboolean show) (p->iconic ? p->icon_title : p->title), NULL); */ - icon_popup_show(focus_cycle_popup, - (title ? title : - (c->iconic ? c->icon_title : c->title)), - client_icon(p, 48, 48)); + icon_popup_delay_show(focus_cycle_popup, G_USEC_PER_SEC/12, + (title ? title : + (c->iconic ? c->icon_title : c->title)), + client_icon(p, 48, 48)); g_free(title); } } @@ -485,7 +480,8 @@ static gboolean valid_focus_target(ObClient *ft, gboolean dock_windows) 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;