[Bugs] #4897 Sugar NORM: menu pops up in wrong place sometimes

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Fri Oct 9 02:30:04 EDT 2015


#4897: menu pops up in wrong place sometimes
---------------------+-------------------------------
  Reporter:  quozl   |            Owner:
      Type:  defect  |           Status:  new
  Priority:  Normal  |        Milestone:  Unspecified
 Component:  Sugar   |          Version:  Unspecified
  Severity:  Minor   |       Resolution:
  Keywords:          |  Distribution/OS:  OLPC
Bug Status:  New     |
---------------------+-------------------------------

Old description:

> sometimes a menu will appear in the wrong place on screen.  this seems to
> happen especially when the system is under load.
>
> however, it can be reproduced carefully on a system with no load by
> forging mouse actions with strict timing.
>
> sugar should behave correctly even in this scenario, and fixing it to
> work correctly will also fix the problems when under load.
>
> restating in standard bug report format:
>
> problem: menu pops up in wrong place sometimes
>
> reproducer: right click on the centre icon, then between 10 and 40
> milliseconds later move the mouse a long way from the icon.
>
> expected result: menu should be drawn where the click was captured.
>
> observed result: menu is drawn in the new mouse location.
>
> occurs reliably with times of up to 100 milliseconds, then becomes less
> reliable.
>
> automated method of reproducing;
>
> prepare the system:
> {{{
> sudo yum install xdotool
> service sshd start
> chkconfig sshd on
> passwd #   or other method to enable remote SSH into system
> }}}
>
> position sugar at the home view with no menu popped up.
> reproduce the problem:
>
> {{{
> ssh host 'DISPLAY=:0 xdotool mousemove 600 450 click 3 sleep 0.04
> mousemove 30 30'
> }}}
>
> observe the location of the menu.

New description:

 sometimes a palette will appear in the wrong place on screen.  this seems
 to happen especially when the system is under load.

 however, it can be reproduced carefully on a system with no load by
 forging mouse actions with strict timing.

 sugar should behave correctly even in this scenario, and fixing it to work
 correctly will also fix the problems when under load.

 restating in standard bug report format:

 problem: palette pops up in wrong place sometimes

 reproducer: right click on the centre icon, then between 10 and 40
 milliseconds later move the mouse a long way from the icon.

 expected result: palette should be drawn where the click was captured.

 observed result: palette is drawn in the new mouse location.

 occurs reliably with times of up to 100 milliseconds, then becomes less
 reliable.

 automated method of reproducing;

 prepare the system:
 {{{
 sudo yum install xdotool
 service sshd start
 chkconfig sshd on
 passwd #   or other method to enable remote SSH into system
 }}}

 position sugar at the home view with no palette popped up.
 reproduce the problem:

 {{{
 ssh host 'DISPLAY=:0 xdotool mousemove 600 450 click 3 sleep 0.04
 mousemove 30 30'
 }}}

 observe the location of the palette.

--

Comment (by SAMdroid):

 s/menu/palette/g

 Sugar gets the cursor position at https://github.com/sugarlabs/sugar-
 toolkit-gtk3/blob/master/src/sugar3/graphics/palettewindow.py#L852

 To fix this bug, we need to move this to closer to the click

--
Ticket URL: <https://bugs.sugarlabs.org/ticket/4897#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list