handlesMouseStillDown:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

handlesMouseStillDown:

Chris Muller-4
I have a custom morph that overrides handlesMouseStillDown: to return true.

Simply by doing only that, it causes
WorldState>>#drawWorld:submorphs:invalidAreasOn: to send
#fullDrawMorph: with my Morph as the argument on every MouseMove event
over my morph, regardless whether any button is down or not.

I only noticed it because the rapid redrawing causes a slight
flickering in my Morph.

Setting handlesMouseStillDown: back to false, my morph's redrawing
code is not executed at all when I move through it.

I have no idea why simply handling this event causes the rapid redrawing.

Thanks for any suggestions..

Reply | Threaded
Open this post in threaded view
|

Re: handlesMouseStillDown:

Chris Muller-3
Finally figured it out.  I had overridden #handlesMouseMove: to answer
true and, for some reason, Morphic calls handleMouseStillDown: from
handleMouseMove: even when no button is down.  Strange!

On Fri, Apr 18, 2014 at 10:14 AM, Chris Muller <[hidden email]> wrote:

> I have a custom morph that overrides handlesMouseStillDown: to return true.
>
> Simply by doing only that, it causes
> WorldState>>#drawWorld:submorphs:invalidAreasOn: to send
> #fullDrawMorph: with my Morph as the argument on every MouseMove event
> over my morph, regardless whether any button is down or not.
>
> I only noticed it because the rapid redrawing causes a slight
> flickering in my Morph.
>
> Setting handlesMouseStillDown: back to false, my morph's redrawing
> code is not executed at all when I move through it.
>
> I have no idea why simply handling this event causes the rapid redrawing.
>
> Thanks for any suggestions..
>

Reply | Threaded
Open this post in threaded view
|

Re: handlesMouseStillDown:

timrowledge

On 18-04-2014, at 9:12 AM, Chris Muller <[hidden email]> wrote:

> Finally figured it out.  I had overridden #handlesMouseMove: to answer
> true and, for some reason, Morphic calls handleMouseStillDown: from
> handleMouseMove: even when no button is down.  Strange!

There’s a lot of strange stuff in there with almost no sort of documentation to provide any context. I’ve tried to doc the layout policy and drag/drop related code on the swiki but much, much more is needed.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Never write software that patronizes the user.