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 785090 - workspace: Use has_pointer() method instead of property
workspace: Use has_pointer() method instead of property
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-19 00:55 UTC by Florian Müllner
Modified: 2017-07-22 18:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workspace: Use has_pointer() method instead of property (1.50 KB, patch)
2017-07-19 00:55 UTC, Florian Müllner
committed Details | Review
workspace: Switch back to using the :has-pointer property (1.53 KB, patch)
2017-07-22 09:51 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-07-19 00:55:08 UTC
Looks like some more fallout from the recent gjs update. I'll ask Philip whether the behavior change is intentional, but in any case the patch doesn't hurt.
Comment 1 Florian Müllner 2017-07-19 00:55:13 UTC
Created attachment 355901 [details] [review]
workspace: Use has_pointer() method instead of property

ClutterActor has both a has_pointer() method and a :has-pointer
property (that we represent as 'has_pointer'). So far gjs was
able to deal with the name overlap, but now trying to use the
property will instead test for the availability of the method.
Just avoid the conflict by switching to the method, which is
unambiguous.
Comment 2 Rui Matos 2017-07-19 08:42:29 UTC
Review of attachment 355901 [details] [review]:

ok
Comment 3 Florian Müllner 2017-07-19 09:09:46 UTC
Attachment 355901 [details] pushed as 6878ee9 - workspace: Use has_pointer() method instead of property
Comment 4 Florian Müllner 2017-07-22 09:50:41 UTC
Sigh, this worked less well than I thought :-(
Comment 5 Florian Müllner 2017-07-22 09:51:15 UTC
Created attachment 356163 [details] [review]
workspace: Switch back to using the :has-pointer property

In case where a method- and property name overlap, using the method
is less unambiguous than I thought - mozjs52-based gjs will only see
the method, while mozjs38-based gjs will only see the property. We
are in luck though, and the real property name contains dashes that
allow us to refer to the property in a way that works for all gjs
versions.
Comment 6 Rui Matos 2017-07-22 17:02:29 UTC
Review of attachment 356163 [details] [review]:

guess I didn't open up the overview while trying the previous one
Comment 7 Florian Müllner 2017-07-22 18:32:55 UTC
Attachment 356163 [details] pushed as 734511a - workspace: Switch back to using the :has-pointer property