diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2007-05-13 20:04:30 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2007-05-13 20:04:30 +0000 |
| commit | 2b2245851d2cd6d104c3ba56893646e2e2358794 (patch) | |
| tree | 10155e398051c20f507fb78349fed974690baa80 /openbox | |
| parent | 02f6e4509eef69883bce2de1f316983a5d94326f (diff) | |
restore code that keeps popups on screen
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/popup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openbox/popup.c b/openbox/popup.c index 156ce860..91c1849c 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -154,6 +154,9 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text) gint emptyx, emptyy; /* empty space between elements */ gint textx, texty, textw, texth; gint iconx, icony, iconw, iconh; + Rect *area; + + area = screen_physical_area(); RrMargins(self->a_bg, &l, &t, &r, &b); @@ -225,6 +228,9 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text) 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); RrPaint(self->a_bg, self->bg, w, h); |
