projects
/
dana
/
openbox-history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f6e45
)
restore code that keeps popups on screen
author
Mikael Magnusson
<mikachu@comhem.se>
Sun, 13 May 2007 20:04:30 +0000
(20:04 +0000)
committer
Mikael Magnusson
<mikachu@comhem.se>
Sun, 13 May 2007 20:04:30 +0000
(20:04 +0000)
openbox/popup.c
patch
|
blob
|
history
diff --git
a/openbox/popup.c
b/openbox/popup.c
index
156ce86
..
91c1849
100644
(file)
--- 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);