add: } else if (event->xclient.message_type == _XA_WM_COLORMAP_NOTIFY && event->xclient.format == 32) { WScreen *scr = wScreenForRootWindow(event->xclient.window);  if (!scr) return;  if (event->xclient.data.l[1] == 1) {    wColormapAllowClientInstallation(scr, True); } else {		        wColormapAllowClientInstallation(scr, False); }
context: handleClientMessage(XEvent *event){    WWindow *wwin;    WObjDescriptor *desc;    #ifdef DEBUG    puts("got client message");#endif    /* handle transition from Normal to Iconic state */    if (event->xclient.message_type == _XA_WM_CHANGE_STATE	&& event->xclient.format == 32 	&& event->xclient.data.l[0] == IconicState) {		wwin = wWindowFor(event->xclient.window);	if (!wwin) return;	if (!wwin->flags.miniaturized)	    wIconifyWindow(wwin);    } else if (event->xclient.message_type == _XA_WINDOWMAKER_WM_FUNCTION) {	WApplication *wapp;	int done=0;	wapp = wApplicationOf(event->xclient.window);	if (wapp) {	    switch (event->xclient.data.l[0]) {	     case WMFHideOtherApplications:		wHideOtherApplications(wapp->main_window_desc);		done = 1;		break;	     case WMFHideApplication:		wHideApplication(wapp);		done = 1;		break;	    }	}	if (!done) {	    wwin = wWindowFor(event->xclient.window);	    if (wwin) {		switch (event->xclient.data.l[0]) {		 case WMFHideOtherApplications:		    wHideOtherApplications(wwin);		    break;		 case WMFHideApplication:		    wHideApplication(wApplicationOf(wwin->main_window));		    break;		}	    }	}#ifdef XDE_DND    } else if (event->xclient.message_type==_XA_XDE_DATA_AVAILABLE) {	GdkEvent gdkev;	WScreen *scr = wScreenForWindow(event->xclient.window);	Atom tmpatom;	int datalenght;	long tmplong;	char * tmpstr, * runstr, * freestr, * tofreestr;	    printf("x\n");	gdkev.dropdataavailable.u.allflags = event->xclient.data.l[1];	gdkev.dropdataavailable.timestamp = event->xclient.data.l[4];	if(gdkev.dropdataavailable.u.flags.isdrop){		gdkev.dropdataavailable.type = GDK_DROP_DATA_AVAIL;		gdkev.dropdataavailable.requestor = event->xclient.data.l[0];		XGetWindowProperty(dpy,gdkev.dropdataavailable.requestor,				event->xclient.data.l[2],				0, LONG_MAX -1,				0, XA_PRIMARY, &tmpatom,				&datalenght,				&gdkev.dropdataavailable.data_numbytes,				&tmplong,				&tmpstr);		datalenght=gdkev.dropdataavailable.data_numbytes-1;		tofreestr=tmpstr;		runstr=NULL;                for(;datalenght>0;datalenght-=(strlen(tmpstr)+1),tmpstr=&tmpstr[strlen(tmpstr)+1]){		freestr=runstr;runstr=wstrappend(runstr,tmpstr);free(freestr);		freestr=runstr;runstr=wstrappend(runstr," ");free(freestr);		}                free(tofreestr);		scr->xdestring=runstr;		/* no need to redirect ? */	        wDockReceiveDNDDrop(scr,event);		free(runstr);		scr->xdestring=NULL;	}    } else if (event->xclient.message_type==_XA_XDE_LEAVE) {	    printf("leave\n");    } else if (event->xclient.message_type==_XA_XDE_ENTER) {	GdkEvent gdkev;	XEvent replyev;	gdkev.dropenter.u.allflags=event->xclient.data.l[1];	printf("from win %x\n",event->xclient.data.l[0]);	printf("to win %x\n",event->xclient.window);        printf("enter %x\n",event->xclient.data.l[1]);        printf("v %x ",event->xclient.data.l[2]);        printf("%x ",event->xclient.data.l[3]);        printf("%x\n",event->xclient.data.l[4]);	if(event->xclient.data.l[2]==_XDE_FILETYPE ||	   event->xclient.data.l[3]==_XDE_FILETYPE ||	   event->xclient.data.l[4]==_XDE_FILETYPE ||	   event->xclient.data.l[2]==_XDE_URLTYPE ||	   event->xclient.data.l[3]==_XDE_URLTYPE ||	   event->xclient.data.l[4]==_XDE_URLTYPE)        if(gdkev.dropenter.u.flags.sendreply){		/*reply*/            replyev.xclient.type = ClientMessage;            replyev.xclient.window = event->xclient.data.l[0];            replyev.xclient.format = 32;            replyev.xclient.message_type = _XA_XDE_REQUEST;            replyev.xclient.data.l[0] = event->xclient.window;            gdkev.dragrequest.u.allflags = 0;            gdkev.dragrequest.u.flags.protocol_version = 0;            gdkev.dragrequest.u.flags.willaccept = 1;            gdkev.dragrequest.u.flags.delete_data = 0;            replyev.xclient.data.l[1] = gdkev.dragrequest.u.allflags;            replyev.xclient.data.l[2] = replyev.xclient.data.l[3] = 0;            replyev.xclient.data.l[4] = event->xclient.data.l[2];            XSendEvent(dpy, replyev.xclient.window, 0, NoEventMask, &replyev);            XSync(dpy, 0);        }#endif /* XDE_DND */#ifdef OFFIX_DND    } else if (event->xclient.message_type==_XA_DND_PROTOCOL) {	WScreen *scr = wScreenForWindow(event->xclient.window);        if (scr && wDockReceiveDNDDrop(scr,event))	    goto redirect_message;#endif /* OFFIX_DND */    } else {#ifdef OFFIX_DND     redirect_message:#endif	/*	 * Non-standard thing, but needed by OffiX DND.	 * For when the icon frame gets a ClientMessage	 * that should have gone to the icon_window.	 */	if (XFindContext(dpy, event->xbutton.window, wWinContext, 			 (XPointer *)&desc)!=XCNOENT) {	    struct WIcon *icon=NULL;	    if (desc->parent_type == WCLASS_MINIWINDOW) {		icon = (WIcon*)desc->parent;	    } else if (desc->parent_type == WCLASS_DOCK_ICON		     || desc->parent_type == WCLASS_APPICON) {		icon = ((WAppIcon*)desc->parent)->icon;	    }	    if (icon && (wwin=icon->owner)) {		if (wwin->client_win!=event->xclient.window) {		    event->xclient.window = wwin->client_win;		    XSendEvent(dpy, wwin->client_win, False, NoEventMask, 			       event);		}	    }	}    }}