change the pager popup to resize based on the layout so the squares can be bigger
data->desktopdir.inter.final,
data->desktopdir.inter.cancel);
if (!data->sendtodir.inter.any.interactive ||
- !data->sendtodir.inter.final ||
- data->sendtodir.inter.cancel)
+ (data->sendtodir.inter.final && !data->sendtodir.inter.cancel))
{
if (d != screen_desktop) screen_set_desktop(d, TRUE);
}
data->sendtodir.inter.final,
data->sendtodir.inter.cancel);
if (!data->sendtodir.inter.any.interactive ||
- !data->sendtodir.inter.final ||
- data->sendtodir.inter.cancel)
+ (data->sendtodir.inter.final && !data->sendtodir.inter.cancel))
{
client_set_desktop(c, d, data->sendtodir.follow);
if (data->sendtodir.follow && d != screen_desktop)
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),
h = self->h;
texth = h - emptyy;
} else
- h = texth + emptyy;
+ h = texth * self->iconhm + emptyy;
if (self->textw)
textw = self->textw;
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 */
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)
{
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;
+}
gint h;
gint minw;
gint maxw;
+ guint iconwm; /* icon width multiplier. multiplied by the normal width */
+ guint iconhm; /* icon height multiplier. multipled by the normal height */
gboolean mapped;
gboolean delay_mapped;
#define icon_popup_text_width_to_strings(p, s, n) \
popup_text_width_to_strings((p)->popup,(s),(n))
#define icon_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))
+void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm);
ObPagerPopup *pager_popup_new();
void pager_popup_free(ObPagerPopup *self);
#define pager_popup_text_width_to_strings(p, s, n) \
popup_text_width_to_strings((p)->popup,(s),(n))
#define pager_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j))
+void pager_popup_icon_size_multiplier(ObPagerPopup *self, guint wm, guint hm);
#endif
a = screen_physical_area_monitor(0);
pager_popup_position(desktop_cycle_popup, CenterGravity,
a->x + a->width / 2, a->y + a->height / 2);
+ pager_popup_icon_size_multiplier(desktop_cycle_popup,
+ screen_desktop_layout.columns /
+ screen_desktop_layout.rows,
+ screen_desktop_layout.rows/
+ screen_desktop_layout.columns);
pager_popup_max_width(desktop_cycle_popup,
MAX(a->width/3, POPUP_WIDTH));
pager_popup_show(desktop_cycle_popup, screen_desktop_names[d], d);
guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear,
gboolean dialog, gboolean done, gboolean cancel)
{
- guint d, r, c;
-
- d = screen_desktop;
+ guint r, c;
+ static guint d = (guint)-1;
+ guint ret;
if ((cancel || done) && dialog)
goto show_cycle_dialog;
+ if (d == (guint)-1)
+ d = screen_desktop;
get_row_col(d, &r, &c);
if (linear) {
screen_desktop_popup(d, TRUE);
} else
screen_desktop_popup(0, FALSE);
- return d;
+ ret = d;
+
+ if (!dialog || cancel || done)
+ d = (guint)-1;
+
+ return ret;
}
void screen_update_layout()