[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XForms] Canvas / button interaction
From: |
Clive Stubbings |
Subject: |
Re: [XForms] Canvas / button interaction |
Date: |
Sat, 11 Feb 2012 14:53:25 +0000 (GMT) |
Jens,
I've been having a bit more look at windows.
What seems to happen is:
A main form window (id 1e00018) is created
GC get created on that
Then a pixmap is created (id 1e0003a)
The pixmap is used for some initial drawing of the objects
The canvas is created with a window (id 1e0003b)
some more drawing happens on the pixmap
the pixmap gets copied to the display
A click event on the checkbutton does its
object drawing on the original (id 1e00018) window
An expose seems to go via the pixmap.
There may be something unstable here too. I'm sure that in the past an expose
event anywhere on the form was enough to cause the objects to be re-drawn.
However in my current build, which has -g enabled and some debug messages, thats
not true any more - expose the button and its displayed, but the expose region
has to include the object..
Basically at the moment it seems to copy a pixmap to 1e00018 but not draw a
polygon on it....
XCopyArea( flx->display, p->pixmap, p->win, flx->gc, 0, 0, p->w, p->h, p->x,
p->y );
vs
XFillPolygon( flx->display, flx->win, flx->gc, xp, n, Nonconvex,
CoordModeOrigin );
Odd..
Cheers
Clive
On Fri, 10 Feb 2012, Jens Thoms Toerring wrote:
Hi Clive,
On Fri, Feb 10, 2012 at 01:37:46AM +0000, Clive Stubbings wrote:
More bits of data..
Adding XFlush() and XSync() calls after the polygon draw makes no difference.
A redraw as a result of an expose event - eg window raise does
result in correct drawing.
Interestingly, it can be any part of the window that is exposed - it
doesn't have to be the bit with the button in it, or the bit with the
canvas..
Two things that are different in the 2 cases are the clipping calls and
the value of flx->win, but it looks like they are not the problem.
Mmm, the different flx->win values worry me a bit. can there
something be going wrong with double buffering?
Jens, any idea how to fake an expose event in Xforms? I'd like to
see if what makes the difference is a real X-expose event or whether
its something different in the xforms handling of expose vs draw.
I guess you could use fl_XPutBackEvent() to stick an arti-
ficially created event into XForms' event queue...
Best regards, Jens
--
\ Jens Thoms Toerring ________ address@hidden
\_______________________________ http://toerring.de
- Re: [XForms] Canvas / button interaction, (continued)
- Re: [XForms] Canvas / button interaction, Ivan Powis, 2012/02/09
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/09
- Re: [XForms] Canvas / button interaction, Jens Thoms Toerring, 2012/02/09
- Re: [XForms] Canvas / button interaction, Ivan Powis, 2012/02/09
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/09
- Re: [XForms] Canvas / button interaction, Paul Nicholson, 2012/02/09
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/09
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/09
- Re: [XForms] Canvas / button interaction, Jens Thoms Toerring, 2012/02/10
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/10
- Re: [XForms] Canvas / button interaction,
Clive Stubbings <=
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/11
- Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/13
Re: [XForms] Canvas / button interaction, Clive Stubbings, 2012/02/09