1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 14:42:29 +01:00

new/changelog fix

This commit is contained in:
kojima
1999-04-03 03:51:17 +00:00
parent 370c15ad2b
commit 9df0e16707
29 changed files with 680 additions and 439 deletions

View File

@@ -57,6 +57,43 @@ static void miniwindowMouseDown(WObjDescriptor *desc, XEvent *event);
static void miniwindowDblClick(WObjDescriptor *desc, XEvent *event);
/****** Notification Observers ******/
static void
appearanceObserver(void *self, WMNotification *notif)
{
WIcon *icon = (WIcon*)self;
int flags = (int)WMGetNotificationClientData(notif);
if (flags & WTextureSettings) {
icon->force_paint = 1;
}
if (flags & WFontSettings) {
icon->force_paint = 1;
}
/*
if (flags & WColorSettings) {
}
*/
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
/* wIconPaint(icon);*/
}
static void
tileObserver(void *self, WMNotification *notif)
{
WIcon *icon = (WIcon*)self;
icon->force_paint = 1;
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
/* wIconPaint(icon);*/
}
/************************************/
INLINE static void
getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int *dep)
{
@@ -138,7 +175,11 @@ wIconCreate(WWindow *wwin)
wIconUpdate(icon);
XFlush(dpy);
WMAddNotificationObserver(appearanceObserver, icon,
WNIconAppearanceSettingsChanged, icon);
WMAddNotificationObserver(tileObserver, icon,
WNIconTileSettingsChanged, icon);
return icon;
}
@@ -191,6 +232,9 @@ wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile)
wIconUpdate(icon);
WMAddNotificationObserver(tileObserver, icon,
WNIconTileSettingsChanged, icon);
return icon;
}
@@ -202,6 +246,8 @@ wIconDestroy(WIcon *icon)
WCoreWindow *core = icon->core;
WScreen *scr = core->screen_ptr;
WMRemoveNotificationObserver(icon);
if (icon->handlerID)
WMDeleteTimerHandler(icon->handlerID);