]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
better buttons for inactive windows - no hover and bright lightup pressed
[chaz/openbox] / openbox / client.c
index 2f374bbff5051250d00be751679e92149dbf1cfc..c3e7ae6cee31e6a949a5b61b4482b6f0b9ca5663 100644 (file)
@@ -1123,16 +1123,24 @@ static void client_get_desktop(ObClient *self)
         }
         if (all != screen_num_desktops) {
             self->desktop = all;
+
+            ob_debug("client desktop set from parents: 0x%x\n",
+                     self->desktop);
         }
         /* try get from the startup-notification protocol */
         else if (sn_get_desktop(self->startup_id, &self->desktop)) {
             if (self->desktop >= screen_num_desktops &&
                 self->desktop != DESKTOP_ALL)
                 self->desktop = screen_num_desktops - 1;
+            ob_debug("client desktop set from startup-notification: 0x%x\n",
+                     self->desktop);
         }
         /* defaults to the current desktop */
-        else
+        else {
             self->desktop = screen_desktop;
+            ob_debug("client desktop set to the current desktop: %d\n",
+                     self->desktop);
+        }
     }
 }
 
@@ -2039,18 +2047,19 @@ void client_update_icons(ObClient *self)
 
         if ((hints = XGetWMHints(ob_display, self->window))) {
             if (hints->flags & IconPixmapHint) {
-                self->nicons++;
+                self->nicons = 1;
                 self->icons = g_new(ObClientIcon, self->nicons);
                 xerror_set_ignore(TRUE);
                 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--;
+                                    &self->icons[0].width,
+                                    &self->icons[0].height,
+                                    &self->icons[0].data))
+                {
+                    g_free(self->icons);
+                    self->nicons = 0;
                 }
                 xerror_set_ignore(FALSE);
             }
This page took 0.025935 seconds and 4 git commands to generate.