Opened 7 years ago

Last modified 5 years ago

#4166 new defect

Long press timeout 'feels' longer than 0.5 seconds

Reported by: erikos Owned by: erikos
Priority: High Milestone: Unspecified
Component: Sugar Version: 0.97.x
Severity: Major Keywords: r?
Cc: manuq, humitos Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

Compare:

  • do a long press in the Home View on one of the activity icons
  • do a long press in the Journal list view on an activity icon

For the latter you have to hold the finger down longer for the Palette to appear. The timeout in the code is the same.

Seen with 0.97.9

Attachments (1)

0001-Ensure-__motion_notify_event_cb-was-called-before-a-.patch (1.5 KB) - added by humitos 6 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by erikos

  • Cc manuq added

comment:2 follow-up: Changed 6 years ago by humitos

Trying to reproduce this bug I found this traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 1444, in __long_pressed_event_cb
    self.notify_right_click()
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 967, in notify_right_click
    self._ensure_palette_exists()
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py", line 955, in _ensure_palette_exists
    palette = self.parent.create_palette()
  File "/usr/lib/python2.7/site-packages/jarabe/journal/listview.py", line 646, in create_palette
    metadata = tree_model.get_metadata(self.props.palette_invoker.path)
  File "/usr/lib/python2.7/site-packages/jarabe/journal/listmodel.py", line 103, in get_metadata
    return model.get(self[path][ListModel.COLUMN_UID])
  File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 782, in __getitem__
    aiter = self._getiter(key)
  File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 776, in _getiter
    aiter = self.get_iter(key)
  File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 798, in get_iter
    path = TreePath(path)
  File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 1209, in __new__
    if len(path) == 0:
TypeError: object of type 'NoneType' has no len()

I not sure why I'm getting this error or how to reproduce it. It happens mainly at startup and not even over the same Journal entry the second time.

  • file: src/sugar3/graphics/palettewindow.py
    • CellRendererInvoker
      • Adding some log to the __long_pressed_event_cb I found it's called 7 times when you longpress over the icon and the third time it enters on the if (self.point_in_cell_renderer returns True)
    • CursorInvoker
      • Adding some log to the __long_pressed_event_cb I found it's called just once when you longpress over the icon

comment:3 Changed 6 years ago by humitos

  • Cc humitos added

comment:4 in reply to: ↑ 2 Changed 6 years ago by humitos

Replying to humitos:

Trying to reproduce this bug I found this traceback:

This traceback is because sometimes CellRendererInvoker.__long_pressed_event_cb is called without a previous call to CellRendererInvoker.__motion_notify_event_cb where the self.path is set to some value different from None.

This is possible just using touchscreen.

comment:5 Changed 6 years ago by humitos

  • Keywords r? added

The patch attached fixes the issue with the traceback from comment:2.

comment:6 Changed 6 years ago by dnarvaez

  • Component changed from sugar-toolkit-gtk3 to Sugar

comment:7 Changed 6 years ago by dnarvaez

  • Milestone changed from 0.98 to Unspecified

comment:8 Changed 6 years ago by dnarvaez

  • Bug Status changed from Assigned to Unconfirmed

comment:9 Changed 6 years ago by dnarvaez

  • Priority changed from Urgent to Normal

comment:10 Changed 5 years ago by godiard

  • Priority changed from Normal to High
Note: See TracTickets for help on using tickets.