X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fpopup.c;h=2768ee2b44fe7663d460dd7398216d40ac62e4a1;hb=209d8df0b15702b523862f1717e055350a34c812;hp=156ce8605b9751ee6205aff9bc7bcc892586291e;hpb=b63ad92cca9f14a1d86c00bd76b52c1626a29ee3;p=chaz%2Fopenbox diff --git a/openbox/popup.c b/openbox/popup.c index 156ce860..2768ee2b 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); @@ -263,7 +269,7 @@ void popup_hide(ObPopup *self) self->mapped = FALSE; /* kill enter events cause by this unmapping */ - event_ignore_queued_enters(); + event_ignore_all_queued_enters(); } else if (self->delay_mapped) { ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout); self->delay_mapped = FALSE;