limit the size popup to the screen, maybe this doesnt work with xinerama though?
This commit is contained in:
parent
335e8acbfc
commit
acc6124682
1 changed files with 7 additions and 0 deletions
|
@ -105,6 +105,10 @@ void popup_show(ObPopup *self, gchar *text)
|
||||||
gint x, y, w, h;
|
gint x, y, w, h;
|
||||||
gint textw, texth;
|
gint textw, texth;
|
||||||
gint iconw;
|
gint iconw;
|
||||||
|
Rect *area; /* won't go outside this */
|
||||||
|
|
||||||
|
area = screen_physical_area_monitor(0); /* XXX i'm guessing this
|
||||||
|
is wrong for xinerama? */
|
||||||
|
|
||||||
RrMargins(self->a_bg, &l, &t, &r, &b);
|
RrMargins(self->a_bg, &l, &t, &r, &b);
|
||||||
|
|
||||||
|
@ -170,6 +174,9 @@ void popup_show(ObPopup *self, gchar *text)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x=MAX(MIN(x, area->width-w),0);
|
||||||
|
y=MAX(MIN(y, area->height-h),0);
|
||||||
|
|
||||||
/* set the windows/appearances up */
|
/* set the windows/appearances up */
|
||||||
XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
|
XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue