summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-12 01:11:33 +0000
committerDana Jansens <danakj@orodu.net>2003-09-12 01:11:33 +0000
commit49a73ce15c6ae9ef5cce4c515a4175088e71e5cd (patch)
treec0ca5e29be73df09b86a57e63b18a7501d74be78 /openbox/client.c
parent71059fdbbbe4e67fff22bcbdf96b12779000035a (diff)
add support for a default icon, but no icon has been made yet.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 4ac234d7..1cc8595b 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1546,6 +1546,16 @@ void client_update_icons(ObClient *self)
}
}
+ if (!self->nicons) {
+ self->nicons++;
+ self->icons = g_new(ObClientIcon, self->nicons);
+ self->icons[self->nicons-1].width = 48;
+ self->icons[self->nicons-1].height = 48;
+ self->icons[self->nicons-1].data = g_memdup(ob_rr_theme->def_win_icon,
+ sizeof(RrPixel32)
+ * 48 * 48);
+ }
+
if (self->frame)
frame_adjust_icon(self->frame);
}
@@ -2603,8 +2613,6 @@ ObClientIcon *client_icon(ObClient *self, int w, int h)
/* li is the largest image < req */
unsigned long size, smallest = 0xffffffff, largest = 0, si = 0, li = 0;
- if (!self->nicons) return NULL;
-
for (i = 0; i < self->nicons; ++i) {
size = self->icons[i].width * self->icons[i].height;
if (size < smallest && size >= (unsigned)(w * h)) {