Files
wmaker/src
Rodolfo García Peñas (kix)andCarlos R. Mafra 8cb744739c Remove wIconUpdate in tileObserver
The call to wIconUpdate() can be changed by call to update_icon_pixmap(),
because the icon doesn't need to be changed.

Now, the icon pixmap is updated faster.

This change is more difficult to see, this is the explanation:

1. wIconUpdate() updates the icon for the applications, then call
   update_icon_pixmap() to re-create the pixmap.
2. tileObserver() is used if the event WNIconTileSettingsChanged() is
   launched. This event is used in the Notification for docks and wwindows:

WMAddNotificationObserver(tileObserver, icon, WNIconTileSettingsChanged, icon);

3. The function WNIconTileSettingsChanged() is used if the icon need refresh,
   used in the wReadDefaults() function. See code below. This function is used
   in the wmaker startup.

   if (needs_refresh & REFRESH_ICON_TILE)
     WMPostNotificationName(WNIconTileSettingsChanged, NULL, NULL);

4. Finally, the flag to refresh the icon tile is throw by setIconTile():

   return (reset ? REFRESH_ICON_TILE : 0);

   And this function only changes the the icon tile if reset is "1", that
   happend if src->icon_tile:

        if (scr->icon_tile) {
          reset = 1;
          RReleaseImage(scr->icon_tile);
          XFreePixmap(dpy, scr->icon_tile_pixmap);
        }

5. Then, we can drop the function wIconUpdate(), because the change is in the
   icon_tile variable, used only in icon_update_pixmap(). This function is
   only used in update_icon_pixmap() (not in wIconUpdate):

kix@kentin:~/src/wmaker/git/wmaker-crm/src$ grep icon_tile icon.c
                tile = RCloneImage(scr->icon_tile);
        XSetWindowBackgroundPixmap(dpy, icon->core->window, scr->icon_tile_pixmap);
kix@kentin:~/src/wmaker/git/wmaker-crm/src$

static void icon_update_pixmap(WIcon *icon, RImage *image)
{
[snip]
  if (icon->tile_type == TILE_NORMAL) {
    tile = RCloneImage(scr->icon_tile);
  } else {
    assert(scr->clip_tile);
    tile = RCloneImage(scr->clip_tile);
  }
[snip]

The XSetWindowBackgroundPixmap() call doesn't matter here.
2013-04-08 22:06:27 +01:00
..
2013-04-03 19:33:34 +01:00
2012-06-26 16:56:20 +01:00
2012-05-04 18:41:01 -03:00
2013-04-08 22:06:26 +01:00
2010-09-11 17:32:57 +02:00
2012-11-10 19:42:24 +00:00
2012-02-19 10:05:31 +00:00
2013-04-08 22:06:27 +01:00
2013-03-21 10:01:04 +00:00
2012-11-11 11:59:41 +00:00
2010-09-11 17:32:57 +02:00
2013-04-03 19:33:34 +01:00
2013-04-08 22:06:27 +01:00
2013-04-08 22:06:26 +01:00
2013-01-12 14:37:31 +00:00
2012-06-24 12:32:36 +01:00
2013-04-03 19:33:34 +01:00
2013-04-03 19:33:34 +01:00
2013-03-28 18:47:25 +00:00
2012-06-24 12:32:36 +01:00
2010-03-27 10:31:13 +01:00
2012-05-04 18:41:01 -03:00
2013-04-03 19:33:34 +01:00
2012-04-04 19:44:40 +01:00
2012-04-04 19:44:40 +01:00
2013-03-26 23:19:39 +00:00
2013-03-26 23:19:39 +00:00
2012-06-24 12:30:17 +01:00
2013-03-27 00:24:17 +00:00
2012-06-26 10:49:05 +01:00
2013-01-12 14:37:31 +00:00
2013-01-12 14:37:31 +00:00
2012-11-19 00:12:46 +01:00
2013-04-03 19:33:34 +01:00
2012-06-23 11:25:37 +01:00
2012-06-23 11:25:37 +01:00
2012-11-11 12:00:59 +00:00
2012-05-04 18:41:01 -03:00
2012-11-14 22:49:42 +00:00
2013-04-03 19:33:34 +01:00
2013-01-12 14:37:31 +00:00
2013-04-08 22:06:26 +01:00
2012-04-04 19:44:40 +01:00
2012-04-04 19:44:40 +01:00
2013-04-03 19:33:34 +01:00
2012-10-30 15:26:52 +00:00
2013-01-07 21:19:40 +00:00
1998-09-29 22:36:29 +00:00