I'm somewhat in the dark about xwin focus issues. I recall Tk goes to some
trouble to "do the right thing" about it, and maybe that's the problem here.
The demo was originally envisioned as testing ground for more arcane scenarios
involving the Tk driver; I'm a little amused/surprised it sort of works for
xwin as well (a bug: the plot is only supposed to advance when the master
widget gets the page advance, but on my build the xwin driver advances when
either window does). Anyway, regarding focus, maybe Tk solves some problem
that we're not.
Sorry I couldn't be of more help.
On Thursday, August 5, 2010 at 17:31:11 (-0700) Alan W. Irwin writes:
> Hi Maurice:
> If I run x14c like
> examples/c/x14c -dev whatever
> on a KDE desktop that is set up with the high or extreme setting to
> prevent focus stealing (via System Settings ==> Window Behavior ==>
> Window Behavior ==> Focus Stealing Prevention Level), it works fine
> for -dev xcairo, -dev qtwidget, and even -dev tk (once I click on the window
> generated by x14c to give that window focus), but hangs (with top
> giving 100 per cent of the cpu to x14c indefinitely) for -dev xwin
> regardless of clicking on the window. If I use -debug, I get one
> expose event before attempting to click on the window, but then it
> hangs with two black screens (one with a vertical red line through it) until I
> hit ctrl-C.
> Demo of multiple output streams via the xwin driver.
> Running with the second stream as slave to the first.
> ExposeEH: x = 92, y = 0, width = 408, height = 410, count = 0, pending
> = 0
> If I set focus stealing prevention to none, low, or medium, all is well
> with -dev xwin.
> It appears with x14c (but no other example) that -dev xwin (but no
> other device including -dev tk) requires focus stealing (perhaps for
> the second window?) from the start or otherwise it hangs. Do you (or
> anybody else on this list) have some suggestions for fixing xwin.c so
> this issue does not happen?
> 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
> Linux-powered Science