X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=d7a99def5c6d125fe9b1109cbd0c180ffa96fee6;hb=a4a0cb78294bb1809b836ea1e86e9d7294bb2929;hp=13cd7258c3db27ca439b1d00f8d394b0ef8047d7;hpb=7cbac3c4d5ea86e673d7b51f74eeaba91b8bd72b;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 13cd7258..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;