After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734357 - GtkListBox doesn't get events delivered for GtkStack children
GtkListBox doesn't get events delivered for GtkStack children
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkGesture
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-08-06 12:35 UTC by Kalev Lember
Modified: 2014-08-12 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test app demonstrating the issue (1.03 KB, text/plain)
2014-08-06 12:35 UTC, Kalev Lember
  Details
widget: Include event controllers' event mask on gtk_widget_get_events() (1012 bytes, patch)
2014-08-11 15:04 UTC, Carlos Garnacho
committed Details | Review
stack: Ensure the bin window has an evmask suitable to windowless children (1.60 KB, patch)
2014-08-11 15:04 UTC, Carlos Garnacho
committed Details | Review

Description Kalev Lember 2014-08-06 12:35:25 UTC
Created attachment 282696 [details]
Test app demonstrating the issue

We have a page in gnome-software that has GtkStack children packed in a GtkListBox. This used to work fine in past but has regressed at some point.

It seems that GtkStack somehow eats up mouse click events and they never get delivered to the listbox. This manifests in unclickable rows that don't do anything.

I did a minimal testcase which I'm attaching here. Editing the file and changing '#if 1' to '#if 0' switches between GtkBox and GtkSTack children and the latter breaks the test.
Comment 1 Matthias Clasen 2014-08-07 12:54:21 UTC
Carlos, this looks like gesture porting fallback maybe ?
Comment 2 Carlos Garnacho 2014-08-11 15:03:14 UTC
It didn't strictly look like that in the end, I'm unsure though how it used to work before, I don't see many changes that could have affected GtkStack's bin window evmask, which I think is the culprit.

I however found some gesture fallout while fixing this, attaching here the patch as well.
Comment 3 Carlos Garnacho 2014-08-11 15:04:27 UTC
Created attachment 283111 [details] [review]
widget: Include event controllers' event mask on gtk_widget_get_events()

gtk_widget_get_events() must indeed tell about events enabled purely through
a GtkEventController, those events will most surely trigger event handlers.
Comment 4 Carlos Garnacho 2014-08-11 15:04:32 UTC
Created attachment 283112 [details] [review]
stack: Ensure the bin window has an evmask suitable to windowless children

If a child has set_has_window == FALSE, it purely relies on the events set on
the parent window, for which the bin window used to just ensure the exposure
mask, eating all input events.
Comment 5 Matthias Clasen 2014-08-12 01:55:33 UTC
Review of attachment 283111 [details] [review]:

should probably adjust the documentation to point out that this is not fully symmetric with set_events anymore, but includes events from gestures
Comment 6 Matthias Clasen 2014-08-12 01:56:15 UTC
Review of attachment 283112 [details] [review]:

ok
Comment 7 Carlos Garnacho 2014-08-12 12:34:56 UTC
(In reply to comment #5)
> Review of attachment 283111 [details] [review]:
> 
> should probably adjust the documentation to point out that this is not fully
> symmetric with set_events anymore, but includes events from gestures

Good point, the relation between those should be documented indeed. I at first thought that controllers' evmask still strictly fitted into the "events that the widget will receive" description. I'm pushing a patch that adds also explains this further in docs.
Comment 8 Carlos Garnacho 2014-08-12 12:36:31 UTC
Attachment 283111 [details] pushed as 6250777 - widget: Include event controllers' event mask on gtk_widget_get_events()
Attachment 283112 [details] pushed as 8ff4757 - stack: Ensure the bin window has an evmask suitable to windowless children