rem: WMDrawString(scr->wmscreen, fwin->titlebar->window, *fwin->title_gc, *fwin->font, x, TITLEBAR_EXTRA_HEIGHT/2, title, titlelen);
add: WMDrawString(fwin->screen_ptr->wmscreen, fwin->titlebar->window, *fwin->title_gc, *fwin->font, x, TITLEBAR_EXTRA_HEIGHT/2, title, titlelen);
context: wFrameWindowPaint(WFrameWindow *fwin){    if (fwin->flags.is_client_window_frame)	fwin->flags.justification = wPreferences.title_justification;    if (fwin->flags.need_texture_remake) {	int i;	fwin->flags.need_texture_remake = 0;	fwin->flags.need_texture_change = 0;	if (fwin->flags.single_texture) {	    remakeTexture(fwin, 0);	    updateTexture(fwin);	} else {	    /* first render the texture for the current state... */	    remakeTexture(fwin, fwin->flags.state);	    /* ... and paint it */	    updateTexture(fwin);	    for (i=0; i < 3; i++) {		if (i!=fwin->flags.state)		    remakeTexture(fwin, i);	    }	}    }        if (fwin->flags.need_texture_change) {		fwin->flags.need_texture_change = 0;		updateTexture(fwin);    }        if (fwin->titlebar && !fwin->flags.repaint_only_resizebar	&& fwin->title_texture[fwin->flags.state]->any.type==WTEX_SOLID) {	wDrawBevel(fwin->titlebar->window, fwin->titlebar->width,		   fwin->titlebar->height,		   (WTexSolid*)fwin->title_texture[fwin->flags.state], 		   WREL_RAISED);    }        if (fwin->resizebar	&& !fwin->flags.repaint_only_titlebar	&& fwin->resizebar_texture[0]->any.type == WTEX_SOLID) {	Window win;	int w, h;	int cw;	GC light_gc, dim_gc;	WTexSolid *texture = (WTexSolid*)fwin->resizebar_texture[0];		w = fwin->resizebar->width;	h = fwin->resizebar->height;	cw = fwin->resizebar_corner_width;	light_gc = texture->light_gc;	dim_gc = texture->dim_gc;	win = fwin->resizebar->window;		XDrawLine(dpy, win, dim_gc, 0, 0, w, 0);	XDrawLine(dpy, win, light_gc, 0, 1, w, 1);		XDrawLine(dpy, win, dim_gc, cw, 2, cw, h);	XDrawLine(dpy, win, light_gc, cw+1, 2, cw+1, h);		XDrawLine(dpy, win, dim_gc, w-cw-2, 2, w-cw-2, h);	XDrawLine(dpy, win, light_gc, w-cw-1, 2, w-cw-1, h);	#ifdef SHADOW_RESIZEBAR	XDrawLine(dpy, win, light_gc, 0, 1, 0, h-1);	XDrawLine(dpy, win, dim_gc, w-1, 2, w-1, h-1);	XDrawLine(dpy, win, dim_gc, 1, h-1, cw, h-1);	XDrawLine(dpy, win, dim_gc, cw+2, h-1, w-cw-2, h-1);	XDrawLine(dpy, win, dim_gc, w-cw, h-1, w-1, h-1);#endif /* SHADOW_RESIZEBAR */    }            if (fwin->title && fwin->titlebar && !fwin->flags.repaint_only_resizebar) {	int x, w;	int lofs = 6, rofs = 6;	int titlelen;	char *title;	int allButtons = 1;        if (!wPreferences.new_style) {	    if (fwin->left_button && !fwin->flags.hide_left_button		&& !fwin->flags.lbutton_dont_fit)		lofs += fwin->left_button->width + 3;	    else		allButtons = 0;#ifdef XKB_BUTTON_HINT	    if (fwin->language_button && !fwin->flags.hide_language_button		&& !fwin->flags.languagebutton_dont_fit)		lofs += fwin->language_button->width;	    else		allButtons = 0;#endif	    	    if (fwin->right_button && !fwin->flags.hide_right_button		&& !fwin->flags.rbutton_dont_fit)		rofs += fwin->right_button->width + 3;	    else		allButtons = 0;        }#ifdef XKB_BUTTON_HINT        fwin->languagebutton_image =            fwin->screen_ptr->b_pixmaps[WBUT_XKBGROUP1 + fwin->languagemode];#endif	title = ShrinkString(*fwin->font, fwin->title,			     fwin->titlebar->width - lofs - rofs);	titlelen = strlen(title);	w = WMWidthOfString(*fwin->font, title, titlelen);	switch (fwin->flags.justification) {	 case WTJ_LEFT:	    x = lofs;	    break;	 case WTJ_RIGHT:	    x = fwin->titlebar->width - w - rofs;	    break;	 default:	    if (!allButtons)		x = lofs + (fwin->titlebar->width - w - lofs - rofs) / 2;	    else		x = (fwin->titlebar->width - w) / 2;	    break;	}#ifdef TITLE_TEXT_SHADOW       if(wPreferences.title_shadow){          int shadowx,shadowy;          XSetForeground(dpy, *fwin->title_gc,               fwin->title_pixel[fwin->flags.state+3]);           for(shadowx=0;shadowx<TITLE_TEXT_SHADOW_WIDTH;shadowx++)           for(shadowy=0;shadowy<TITLE_TEXT_SHADOW_HEIGHT;shadowy++)		   WMDrawString(scr->wmscreen, fwin->titlebar->window,				*fwin->title_gc, *fwin->font,				x + shadowx + TITLE_TEXT_SHADOW_X_OFFSET, 				TITLEBAR_EXTRA_HEIGHT/2				+ shadowy + TITLE_TEXT_SHADOW_Y_OFFSET, title,				titlelen);       }#endif /* TITLE_TEXT_SHADOW */	XSetForeground(dpy, *fwin->title_gc, 		       fwin->title_pixel[fwin->flags.state]);		WMDrawString(scr->wmscreen, fwin->titlebar->window, *fwin->title_gc,		     *fwin->font, x, TITLEBAR_EXTRA_HEIGHT/2, title, titlelen);	free(title);		if (fwin->left_button)	    handleButtonExpose(&fwin->left_button->descriptor, NULL);	if (fwin->right_button)	    handleButtonExpose(&fwin->right_button->descriptor, NULL);#ifdef XKB_BUTTON_HINT	if (fwin->language_button)	    handleButtonExpose(&fwin->language_button->descriptor, NULL);#endif     }}