summaryrefslogtreecommitdiff
path: root/openbox/popup.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-10 16:04:08 +0000
committerDana Jansens <danakj@orodu.net>2007-05-10 16:04:08 +0000
commit9a3f05a780f8cbfeb68626552d25c48ab0245ca3 (patch)
treeb643583a54465307cb72fa8e7deb8fa8acec6136 /openbox/popup.c
parentdf45b1e146b31e31f7cdf9142ffc04f44d6c9649 (diff)
don't make interactive desktop cycling switch until you release the mods. this is needed because otherwise focus moves around during the grab and applications get confused. :|
change the pager popup to resize based on the layout so the squares can be bigger
Diffstat (limited to 'openbox/popup.c')
-rw-r--r--openbox/popup.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/openbox/popup.c b/openbox/popup.c
index bf682aaf..f341e092 100644
--- a/openbox/popup.c
+++ b/openbox/popup.c
@@ -39,6 +39,7 @@ ObPopup *popup_new()
self->x = self->y = self->textw = self->h = 0;
self->a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
self->a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
+ self->iconwm = self->iconhm = 1;
attrib.override_redirect = True;
self->bg = XCreateWindow(ob_display, RootWindow(ob_display, ob_screen),
@@ -172,7 +173,7 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
h = self->h;
texth = h - emptyy;
} else
- h = texth + emptyy;
+ h = texth * self->iconhm + emptyy;
if (self->textw)
textw = self->textw;
@@ -182,7 +183,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
emptyx = l + r + ob_rr_theme->paddingx * 2;
if (self->hasicon) {
- iconw = iconh = texth;
+ iconw = texth * self->iconwm;
+ iconh = texth * self->iconhm;
textx += iconw + ob_rr_theme->paddingx;
if (textw)
emptyx += ob_rr_theme->paddingx; /* between the icon and text */
@@ -322,6 +324,12 @@ void icon_popup_delay_show(ObIconPopup *self, gulong usec,
popup_delay_show(self->popup, usec, text);
}
+void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm)
+{
+ if (wm != 0) self->popup->iconwm = wm;
+ if (hm != 0) self->popup->iconhm = hm;
+}
+
static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
gpointer data)
{
@@ -492,3 +500,9 @@ void pager_popup_delay_show(ObPagerPopup *self, gulong usec,
popup_delay_show(self->popup, usec, text);
}
+
+void pager_popup_icon_size_multiplier(ObPagerPopup *self, guint wm, guint hm)
+{
+ if (wm != 0) self->popup->iconwm = wm;
+ if (hm != 0) self->popup->iconhm = hm;
+}