On 13 Nov 2002, Martin Sevior wrote: > On Wed, 2002-11-13 at 04:41, Joaquin Cuenca Abela wrote: > > Sorry for non giving any live signal for a while, I > > was on a trip. > > > > I've just read the whole xft printing problems. I've > > not dig into the problem, but printing with the xft > > build was working when I left it, but that was before > > the unification of units by thomas, so maybe that > > stopped working there. > > > > I don't know where come the problems with embedding > > fonts. Embedding fonts (TT & PS) was also working > > when I last touched it. > > > > The problem about the status bar not working with > > double buffering is there because xft calls (as any > > non gdk primitives) don't get diverted to the double > > buffer, so all the things that we draw in a double > > buffered GdkWindow using non gdk calls are covered by > > the double buffer when gdk copies it on the GdkWindow > > at the end of the expose event (you can see it that's > > the problem with the status bar if it flicker a very > > little bit before it disappears). > > > > This makes sense and is what Havoc said was happening too. > > > We should instead draw the text to the GdkDrawable > > that's being used by gdk to do the double buffer (you > > can get the real GdkDrawable using > > gdk_window_get_internal_paint_info(...) ) > > > > Hi Joaquin, > I tried this but it didn't work. I have this cod ein > gr_UnixGraphics.cpp > > > #ifdef USE_XFT > // > // Martin's attempt to make double buffering work.with xft > // > #if 1 > gint xoff,yoff; > GdkDrawable * realDraw; > gdk_window_get_internal_paint_info (m_pWin, &realDraw,&xoff,&yoff); > m_pGC = gdk_gc_new(realDraw); > m_pXORGC = gdk_gc_new(realDraw); > m_pVisual = GDK_VISUAL_XVISUAL( gdk_drawable_get_visual(realDraw)); > m_Drawable = gdk_x11_drawable_get_xid(realDraw); > > #else > m_pVisual = GDK_VISUAL_XVISUAL(gdk_window_get_visual(win)); > m_Drawable = GDK_WINDOW_XWINDOW(m_pWin); > m_pGC = gdk_gc_new(m_pWin); > m_pXORGC = gdk_gc_new(m_pWin); > #endif > m_pXftFont = NULL; > m_Colormap = GDK_COLORMAP_XCOLORMAP(m_pColormap); > m_pXftDraw = XftDrawCreate(GDK_DISPLAY(), m_Drawable, m_pVisual, > m_Colormap); > #else > m_pGC = gdk_gc_new(m_pWin); > m_pXORGC = gdk_gc_new(m_pWin); > #endif > > > What is wrong here? >
Whoops! Actually with a couple of other tweaks in xap_UnixFrame it works perfectly now :-) Double buffering rocks! No more screen weirdness, status bar works great. Lovely. I'll commit it tommorrow. Basically I had to also disable the background repainter. Cheers Martin
