]> Dogcows Code - chaz/openbox/blobdiff - openbox/framerender.c
try grab an icon even when there are none
[chaz/openbox] / openbox / framerender.c
index 1f783a5402aed6725496ec08393e67ac7a45ce27..a19b4ec0d4956693826745278bfa651e74b54490 100644 (file)
@@ -1,3 +1,21 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   framerender.c for the Openbox window manager
+   Copyright (c) 2003        Ben Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
 #include "frame.h"
 #include "openbox.h"
 #include "screen.h"
@@ -217,12 +235,14 @@ static void framerender_label(ObFrame *self, RrAppearance *a)
 
 static void framerender_icon(ObFrame *self, RrAppearance *a)
 {
+    const ObClientIcon *icon;
+
     if (self->icon_x < 0) return;
 
-    if (self->client->nicons) {
-        ObClientIcon *icon = client_icon(self->client,
-                                         ob_rr_theme->button_size + 2,
-                                         ob_rr_theme->button_size + 2);
+    icon = client_icon(self->client,
+                       ob_rr_theme->button_size + 2,
+                       ob_rr_theme->button_size + 2);
+    if (icon) {
         a->texture[0].type = RR_TEXTURE_RGBA;
         a->texture[0].data.rgba.width = icon->width;
         a->texture[0].data.rgba.height = icon->height;
This page took 0.026608 seconds and 4 git commands to generate.