On 2009-04-25 18:43-0400 Hazen Babcock wrote:

> Alan W. Irwin wrote:
>> Hi Hazen:
>> 
>> I have found a text bug that affects -dev xcairo. To demonstrate the bug 
>> run
>> any example with -dev xcairo and change focus off the window and back or
>> make an attempt to resize the window.  On Linux, at least, all the text
>> disappears from the window created by xcairo.
>
> I think that the fact that it worked with the old text rendering was more of 
> a feature :). Seriously though, this just highlights one of the problems with 
> the xcairo driver, which is that it does not actually handle any xwindows 
> events, such as redraw or resize itself. The fact that it even redraws the 
> plots at all, often in a very strange flashing fashion if the plot has lots 
> of points, is just a fortuitous coincidence and is I believe entirely 
> dependent on the users X windows system. I wouldn't be surprised if OS-X or 
> Windows users saw very different behaviors.
>
> So the question is do we want the xcairo driver to be a fully functioning X 
> Window? This is possible but not entirely trivial. Looking at the xwin driver 
> it seemed to me that most of the code (50%+? of a 3.5k line file) was related 
> to dealing with X Windows. At the time this did not appeal to me since people 
> who wanted resizable plots, etc, probably wanted them in the context of there 
> own windowing scheme and could get that behavior much more cleanly with the 
> Jonathan's external XDrawable extension to the xcairo driver or using the 
> extcairo driver and GTK. However, I can see that there might be command line 
> users of PLplot who want the driver to do more of its own window management.

I just tried a test with -DHAVE_PTHREAD=OFF (because Geoffrey felt that code
was so problematic), and the problem persists, but apparently not to such a
large degree.  Before, just clicking on the xcairo window and then some
other window lost all the text in the xcairo window.  Now that seems fine.
However, resizing the xcairo window does still lose the text with
-DHAVE_PTHREAD=OFF.  Every other X driver we have can be resized without
text issues so I assume you will want to investigate this issue further.

Number one question: can you confirm on the platforms accessible to you this
lost text problem when resizing the xcairo window with -DHAVE_PTHREAD=OFF?

Number two question: if you confirm the problem, does it go away again if
you switch back to the old text handling?

I can only answer your more general question about a full-featured X window
by arguing by analogy.  Note that xcairo makes calls to libpango, libcairo,
and the X backend of cairo.  So does libGTK+ (since libpange/libcairo are in
the GTK+ stack).  Surely in that latter case there is some provision in the
libcairo API to pass complete control of the cairo X backend window to
libGTK+ (and presumably any app that links to it) so that, e.g., window
resizing just works for GNOME apps (which use GTK+). You are probably
already using that provision already. For example, if I resize the xcairo
window for the first example, all the plots persist including the circular
symbols.  It's only the plot titles and x and y axis labels that disappear.
I am pretty sure that means resizing is working in general, and there is
just some some aspect of your new text handling that doesn't quite work
properly in the xcairo context.  They way to test that is to investigate
question number two above.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to