X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=771294a4b3081897fc9db34da889040ae33c7e5a;hb=1b7e813c62a6e54690d15550d51ac4269e63f346;hp=506653752b357ff8164551b9856658811b675aea;hpb=e3b9c8b6814aca2ca44b60517c2784178570fe52;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 50665375..771294a4 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -394,7 +394,7 @@ void client_manage(Window window) */ if (ob_state() == OB_STATE_RUNNING && (transient || - (!(self->sized & USSize) && + (!(self->sized & USSize || self->positioned & USPosition) && client_normal(self) && !self->session))) { @@ -4083,3 +4083,30 @@ gboolean client_has_group_siblings(ObClient *self) { return self->group && self->group->members->next; } + +ObClientIcon *client_thumbnail(ObClient *self, gint wantw, gint wanth) +{ + ObClientIcon *ret; + RrPixel32 *data; + gint w, h; + + if (!self->frame->pixmap) return NULL; + if (!RrPixmapToRGBA(ob_rr_inst, self->frame->pixmap, None, &w, &h, &data)) + return NULL; + + /* resize the thumbnail (within aspect ratio) to the given sizes */ + + ret = g_new(ObClientIcon, 1); + ret->data = data; + ret->width = w; + ret->height = h; + return ret; +} + +void clienticon_free(ObClientIcon *ci) +{ + if (ci) { + g_free(ci->data); + g_free(ci); + } +}