News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
FL_PUSH on arbitrary area
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: FL_PUSH on arbitrary area

The last time I looked at the non-segfaulty one (murgaFLTKDrawFunctions) I had no idea at all of how drawing worked, so I kind of stayed away from looking at the source...then of course forgot that it includes mouse tracking.

Looking at it now....

[time passes]

...hmmm, I see "if Fl:event()==5 or Fl:event()==1 then", but I don't think that would be it considering my test of Fl:event() always returned 0 when clicking a mouse button...
Checking for event 5 (drag) sort of works, although it doesn't give the behavior I'm looking for (click to draw a line from the previous click to the current one). It does look a whole lot better than my previous freehand drawing experiment, though, which simply spit out 1000 tiny rectangles per second as you drag the mouse, so I think I'm going to dump the old version.
The above makes me wonder even more if this is a bug. Why would a drag in an arbitrary location be correctly detected, but a click is not?

[more time passes]

Nope, I'm not seeing how it works =o(
I can think of two things that might possibly have an affect, but they are both wild guesses. One is the w:callback(), which may have some influence over Fl:event(). The other is w:make_current(), which I can't seem to make work in my situation. I'm using a nested window, and when I try to make the parent window active from the child script it segfaults, so I have to make the child window the active one. That works fine for the actual drawing, but I wonder if it affects how events are received.

The quaddraw examples use the same check for event 5 or 1, so I dunno what I'm missing.

I suppose it could also be that I'm using a timer which checks for the events. It seems to me that this shouldn't be necessary, but I don't know how else to do it...unless that's what Fl:wait() is for?...i'll have to check that out

This post was last modified: 09-05-2007 06:48 AM by mikshaw.

09-05-2007 06:38 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
FL_PUSH on arbitrary area - mikshaw - 09-03-2007, 10:36 AM
RE: FL_PUSH on arbitrary area - iGame3D - 09-05-2007, 03:03 AM
RE: FL_PUSH on arbitrary area - mikshaw - 09-05-2007 06:38 AM
RE: FL_PUSH on arbitrary area - JohnMurga - 09-05-2007, 08:43 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: