-/* -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*-
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
popup.c for the Openbox window manager
+ Copyright (c) 2004 Mikael Magnusson
Copyright (c) 2003 Ben Jansens
This program is free software; you can redistribute it and/or modify
gint x, y, w, h;
gint textw, texth;
gint iconw;
+ Rect *area; /* won't go outside this */
+
+ area = screen_physical_area(); /* XXX this should work quite
+ good, someone with xinerama,
+ and different resolutions on
+ screens? */
RrMargins(self->a_bg, &l, &t, &r, &b);
break;
}
+ x=MAX(MIN(x, area->width-w),0);
+ y=MAX(MIN(y, area->height-h),0);
+
/* set the windows/appearances up */
XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
if (!self->mapped) {
XMapWindow(ob_display, self->bg);
- stacking_raise(INTERNAL_AS_WINDOW(self));
+ stacking_raise(INTERNAL_AS_WINDOW(self), FALSE);
self->mapped = TRUE;
}
}
}
void icon_popup_show(ObIconPopup *self,
- gchar *text, struct _ObClientIcon *icon)
+ gchar *text, const ObClientIcon *icon)
{
if (icon) {
self->a_icon->texture[0].type = RR_TEXTURE_RGBA;