Opened 11 years ago

Last modified 11 years ago

#4133 assigned defect

Gtk: some widgets do receive a GDK_CROSSING_UNGRAB leave event when tapped

Reported by: erikos Owned by: garnacho
Priority: Normal Milestone: Unspecified
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords: upstream
Cc: dsd Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

Some widgets (e.g. Gtk.EventBox or a Gtk.TreeView) do get a GDK_CROSSING_UNGRAB leave event when tapped.

Looking at the example attached when I tap on the treeview I do get:

  • a button release event
  • a leave event of mode GDK_CROSSING_TOUCH_END
  • a leave event of mode GDK_CROSSING_UNGRAB

When I click (mouse) on the treeview I do get:

  • a button release event

Now the same for the Gtk.Button, when I tap on the button I do get:

  • a leave event of mode GDK_CROSSING_TOUCH_END

When I click (mouse) on the button I do get:

  • a button release event

Attachments (2)

events.py (1.3 KB) - added by erikos 11 years ago.
test script that has a treeview and a button
patch (633 bytes) - added by garnacho 11 years ago.
gdk patch, avoid double crossing events on touch end

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by erikos

test script that has a treeview and a button

comment:1 Changed 11 years ago by erikos

  • Owner changed from erikos to garnacho
  • Status changed from new to assigned

comment:2 Changed 11 years ago by garnacho

This is related to ticket #4132, the bogus button mask on ButtonRelease seems to trigger gdk to go again through pointer grab checks, which then emits the spurious crossing event. The patch in https://bugs.freedesktop.org/show_bug.cgi?id=56558#c1 fixes the issue

comment:3 Changed 11 years ago by erikos

  • Keywords upstream added

comment:4 Changed 11 years ago by dsd

  • Cc dsd added

comment:5 Changed 11 years ago by erikos

When this lands we can revert http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/icon.py#line494 and http://bugs.sugarlabs.org/attachment/ticket/3921/0001-Journal-TreeView-make-sure-Palette-is-hidden-when-re.patch is obsolete.

Another case are the TrayIcons (used in the device Frame for example) http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/tray.py#line404 which are packed in a Gtk.EventBox as well. The case where we see this is when you reveal the Palette for a Frame device icon with a tap you can not dismiss it by tapping outside the invoker. This is because of the ungrab leave event from above.

comment:6 Changed 11 years ago by garnacho

Some further investigation revealed that the Xorg fix was indirectly fixing this through other broken behavior, as pointed out in https://bugs.freedesktop.org/show_bug.cgi?id=56558#c3 , I'm attaching a tentative GDK patch to improve the situation here, more testing is due though

Changed 11 years ago by garnacho

gdk patch, avoid double crossing events on touch end

comment:7 Changed 11 years ago by dnarvaez

  • Component changed from sugar-toolkit-gtk3 to Sugar

comment:8 Changed 11 years ago by dnarvaez

What remains to be done here? Was garnacho patch upstreamed?

comment:9 Changed 11 years ago by dnarvaez

  • Milestone changed from 0.98 to Unspecified

comment:10 Changed 11 years ago by dnarvaez

  • Bug Status changed from Assigned to Unconfirmed

comment:11 Changed 11 years ago by dnarvaez

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