diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-12 06:00:17 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-12 06:00:17 +0000 |
| commit | 4be58bf13719fd22cb08a7f016eaf757640ccd05 (patch) | |
| tree | 8b87853b47d7084f2751f9f3c5aca02103512807 /openbox/focus.c | |
| parent | 5d658c98e2ce6aa00f0236b3dedfc6ff0c2041ca (diff) | |
new popups with subclasses, added an ObIconPopup for popups with icons, and ObPagerPopup, for a popup with a pager on it.
better logic also for the desktop layout code figuring out how many rows and columns there are.
Diffstat (limited to 'openbox/focus.c')
| -rw-r--r-- | openbox/focus.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/openbox/focus.c b/openbox/focus.c index 6ba125ef..9c29345f 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -22,11 +22,11 @@ GList **focus_order; /* these lists are created when screen_startup sets the number of desktops */ ObClient *focus_cycle_target; -static Popup *focus_cycle_popup; +static ObIconPopup *focus_cycle_popup; void focus_startup(gboolean reconfig) { - focus_cycle_popup = popup_new(TRUE); + focus_cycle_popup = icon_popup_new(TRUE); if (!reconfig) /* start with nothing focused */ @@ -37,7 +37,7 @@ void focus_shutdown(gboolean reconfig) { guint i; - popup_free(focus_cycle_popup); + icon_popup_free(focus_cycle_popup); if (!reconfig) { for (i = 0; i < screen_num_desktops; ++i) @@ -223,22 +223,22 @@ void focus_fallback(ObFocusFallbackType type) static void popup_cycle(ObClient *c, gboolean show) { if (!show) { - popup_hide(focus_cycle_popup); + icon_popup_hide(focus_cycle_popup); } else { Rect *a; ObClient *p = c; char *title; a = screen_physical_area_monitor(0); - popup_position(focus_cycle_popup, CenterGravity, - a->x + a->width / 2, a->y + a->height / 2); -/* popup_size(focus_cycle_popup, a->height/2, a->height/16); - popup_show(focus_cycle_popup, c->title, - client_icon(c, a->height/16, a->height/16)); + 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 */ - popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT); + icon_popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT); /* use the transient's parent's title/icon */ while (p->transient_for && p->transient_for != OB_TRAN_GROUP) @@ -252,9 +252,10 @@ static void popup_cycle(ObClient *c, gboolean show) (p->iconic ? p->icon_title : p->title), NULL); - popup_show(focus_cycle_popup, - (title ? title : (c->iconic ? c->icon_title : c->title)), - client_icon(p, 48, 48)); + icon_popup_show(focus_cycle_popup, + (title ? title : + (c->iconic ? c->icon_title : c->title)), + client_icon(p, 48, 48)); g_free(title); } } |
