[racket] DrRacket right-click menu fragility in Linux - back again

From: Kieron Hardy (kieron.hardy at gmail.com)
Date: Thu Sep 26 13:36:31 EDT 2013

I'm experiencing this issue also, although only occasionally, on a laptop
with a trackpad and Gentoo. Since a trackpad allows one to press the
buttons without any movement of the mouse cursor, I have experimented a
little:

When the context menu (opened with a right-click) is immediately closed
after it starts to appear (sometimes leaving a sliver of the menu's
window's title area), moving the mouse cursor a tiny amount, and then
retrying a right-click, the menu will be opened and receive focus as
normal.

Conversely, I have been able to make the problem occur after first
successful opening the context menu, just by moving the mouse cursor a tiny
amount, and performing another right-click.

My current thinking is that the mouse (x, y) at context menu launch is
being compared to the mouse (x, y) at a slightly later time, and if the
delta is too great (> 0?) then the context menu is closed. This could be
exposing a threading issue; the context menu is being painted by one
thread, and another thread is detecting the mouse movement and closing the
window, sometimes leaving the window-sliver artifact (a remnant of the
window as it started growing). I thought window painting and removal were
performed serially in the same thread, but that doesn't seem to be what I'm
seeing.

Maybe the issue is triggered with noise from the mouse-device's sensors
causing the two (x,y) samples to vary. Maybe turning down the sensitivity
or otherwise playing with the settings in the mouse driver would help?

Perhaps, the two samples are the results of two calculations performed in
different orders, exposing some subtle rounding error? Maybe the mouse
cursor position is being reported relative to two different points (e.g.
relative to the screen in one and relative to the window in the other)?

I'll poke around in the code some and maybe I can help debug further.

Cheers,

Kieron.



On Thu, Sep 26, 2013 at 3:32 AM, Laurent <laurent.orseau at gmail.com> wrote:

> This problem was never really gone for me actually.
> It has become less of a problem, but I still sometimes need to click a few
> times to get the right menu.
> Also, the 'definitions' drop-down list can disappear after clicking it and
> moving the mouse pointer through it.
> So it may be more general than just the right-click menu.
>
> You may still try the latest nightly version, which has had a lot of
> improvements since 5.3.6:
> http://www.cs.utah.edu/plt/snapshots/
>
> Laurent
>
>
> On Thu, Sep 26, 2013 at 9:41 AM, bhrgunatha <bhrgunatha at hotmail.com>wrote:
>
>> I'm having a problem with pop-up menus disappearing immediately from the
>> editor in DrRacket under linux. This is the same as the original problem
>> reported in Nov 2011 [1] - is this a regression problem? Or is it triggered
>> by something new?
>>
>> I remember suffering from this in the past, but it was fixed. But the
>> exact same problem has returned for me.
>>
>> Arch Linux 64 bit:
>> Linux 3.11.11-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux
>>
>> DrRacket 5.3.6.
>> (I'm using the binary package from Arch, but had the same problem with a
>> version I compiled myself)
>>
>> I can't see anything consistent causing the problem. It just seems like
>> it occurs randomly.
>>
>> Editing in DrRacket has become very unpleasant in recent months for me :(
>> [2]
>>
>> Can anyone offer any help to fix this problem?
>> Bhrgunatha.
>>
>>
>> [1] http://thread.gmane.org/gmane.**comp.lang.racket.user/14710/**
>> focus=17669<http://thread.gmane.org/gmane.comp.lang.racket.user/14710/focus=17669>
>>
>> [2] http://thread.gmane.org/gmane.**comp.lang.racket.user/19549/**
>> focus=19555<http://thread.gmane.org/gmane.comp.lang.racket.user/19549/focus=19555>
>>
>> ____________________
>>  Racket Users list:
>>  http://lists.racket-lang.org/**users<http://lists.racket-lang.org/users>
>>
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130926/75187a27/attachment.html>

Posted on the users mailing list.