X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=d7a99def5c6d125fe9b1109cbd0c180ffa96fee6;hb=a4a0cb78294bb1809b836ea1e86e9d7294bb2929;hp=4d1ba85a6d01f93f4614878616467aa2924849b3;hpb=ddeb066ed4b112d9e8b1b7941addfea06b5c2a99;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 4d1ba85a..d7a99def 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1355,10 +1355,11 @@ void client_update_icons(Client *self) self->nicons++; self->icons = g_new(Icon, self->nicons); xerror_set_ignore(TRUE); - if (!render_pixmap_to_rgba(data[0], data[1], - &self->icons[self->nicons-1].width, - &self->icons[self->nicons-1].height, - &self->icons[self->nicons-1].data)) { + if (!RrPixmapToRGBA(ob_rr_inst, + data[0], data[1], + &self->icons[self->nicons-1].width, + &self->icons[self->nicons-1].height, + &self->icons[self->nicons-1].data)) { g_free(&self->icons[self->nicons-1]); self->nicons--; } @@ -1373,12 +1374,13 @@ void client_update_icons(Client *self) self->nicons++; self->icons = g_new(Icon, self->nicons); xerror_set_ignore(TRUE); - if (!render_pixmap_to_rgba(hints->icon_pixmap, - (hints->flags & IconMaskHint ? - hints->icon_mask : None), - &self->icons[self->nicons-1].width, - &self->icons[self->nicons-1].height, - &self->icons[self->nicons-1].data)){ + if (!RrPixmapToRGBA(ob_rr_inst, + hints->icon_pixmap, + (hints->flags & IconMaskHint ? + hints->icon_mask : None), + &self->icons[self->nicons-1].width, + &self->icons[self->nicons-1].height, + &self->icons[self->nicons-1].data)){ g_free(&self->icons[self->nicons-1]); self->nicons--; } @@ -1677,16 +1679,13 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, minh = self->base_size.height; } - w -= basew; - h -= baseh; - if (user) { /* for interactive resizing. have to move half an increment in each direction. */ /* how far we are towards the next size inc */ - int mw = w % self->size_inc.width; - int mh = h % self->size_inc.height; + int mw = (w - basew) % self->size_inc.width; + int mh = (h - baseh) % self->size_inc.height; /* amount to add */ int aw = self->size_inc.width / 2; int ah = self->size_inc.height / 2; @@ -1708,6 +1707,9 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, if (h < minh) h = minh; } + w -= basew; + h -= baseh; + /* keep to the increments */ w /= self->size_inc.width; h /= self->size_inc.height; @@ -1761,7 +1763,11 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, RECT_SET(self->area, x, y, w, h); - if (final || (resized && config_opaque_resize)) + /* for app-requested resizes, always resize if 'resized' is true. + for user-requested ones, only resize if final is true, or when + resizing in opaque mode */ + if ((!user && resized) || + (user && (final || (resized && config_opaque_resize)))) XResizeWindow(ob_display, self->window, w, h); /* move/resize the frame to match the request */ @@ -1769,11 +1775,11 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, if (moved || resized) frame_adjust_area(self->frame, moved, resized); - /* If you send this and the client hasn't moved you end up with buggy + /* If you send this and the client hasn't changed you end up with buggy clients (emacs) freaking out, cuz they send back a configure every time they receive this event, which resends them this event... etc. */ - if (moved && (!user || final)) { + if ((moved || resized) && (!user || final)) { XEvent event; event.type = ConfigureNotify; event.xconfigure.display = ob_display;