X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fpopup.c;h=f46a3a7fd89a13bf666f8d1d4810f56d51bd6898;hb=0f677834e253dfd18a246c8811bf4a4e364d5e0e;hp=e3d52e496a5be3b12c074ee9c17068d04aeed1f3;hpb=6ff520d02ad3091c7e32a3cfc11fe8d3cb9b042f;p=chaz%2Fopenbox diff --git a/openbox/popup.c b/openbox/popup.c index e3d52e49..f46a3a7f 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -52,7 +52,8 @@ ObPopup *popup_new() InputOutput, RrVisual(ob_rr_inst), 0, NULL); XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->fbwidth); - XSetWindowBorder(ob_display, self->bg, ob_rr_theme->frame_b_color->pixel); + XSetWindowBorder(ob_display, self->bg, + RrColorPixel(ob_rr_theme->frame_focused_border_color)); XMapWindow(ob_display, self->text); @@ -153,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); @@ -224,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); @@ -262,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; @@ -317,6 +324,7 @@ void icon_popup_delay_show(ObIconPopup *self, gulong usec, self->a_icon->texture[0].type = RR_TEXTURE_RGBA; self->a_icon->texture[0].data.rgba.width = icon->width; self->a_icon->texture[0].data.rgba.height = icon->height; + self->a_icon->texture[0].data.rgba.alpha = 0xff; self->a_icon->texture[0].data.rgba.data = icon->data; } else self->a_icon->texture[0].type = RR_TEXTURE_NONE; @@ -487,7 +495,8 @@ void pager_popup_delay_show(ObPagerPopup *self, gulong usec, for (i = self->desks; i < screen_num_desktops; ++i) { XSetWindowAttributes attr; - attr.border_pixel = RrColorPixel(ob_rr_theme->frame_b_color); + attr.border_pixel = + RrColorPixel(ob_rr_theme->frame_focused_border_color); self->wins[i] = XCreateWindow(ob_display, self->popup->bg, 0, 0, 1, 1, ob_rr_theme->fbwidth, RrDepth(ob_rr_inst), InputOutput,