Enable GNOME Shell multi-touch gestures on X11. Requires Touchégg https://github.com/JoseExposito/touchegg#readme
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
24 | Active |
23 | Active |
22 | Active |
21 | Rejected |
20 | Rejected |
19 | Rejected |
18 | Rejected |
17 | Active |
16 | Inactive |
15 | Active |
14 | Active |
13 | Active |
12 | Active |
11 | Active |
10 | Active |
9 | Active |
8 | Active |
7 | Active |
6 | Active |
5 | Rejected |
4 | Inactive |
3 | Inactive |
2 | Inactive |
1 | Inactive |
#1 and #2 from version 19's review haven't been addressed here. The thing is, you are using `static` for those properties and not cleaning them up on disable. You should create a destroy method in that class. Inside that class, null out `this.instance` and remove the timeout source id.
Hi! I'm nulling `this.instance` in the closeConnection() method, which is called when the extension is disabled. Honestly, I don't think that the destructor would be invoked as `this.instance` would hold a reference to the class even when the extension is disabled, so I don't know if nulling it in the destructor would have any effect. About the timer: the method is static (as it doesn't acces the `this` pointer and it's enforced by the "class-methods-use-this" ESLint rule) but the "timeoutId" variable is not. The method waits until the timer has been triggered, removes it with "GLib.source_remove" and nulls it. I don't understand why should I have to keep the "timeoutId" for the lifetime of the extension when the timer fires only once.
1. Ok. but what's the reason for making that static? Why not just use `new` in enable? 2. `ret` as source id should be removed on disable which is the actual timeout id. It can get dealyed and get triggered after disable.
Hi! Thanks for the quick response. 1. The reason is that the class is a singleton. I stead of passing the reference to the client connection though different constructors, I can get the single instance easily where I need it. Also, since only a single connection must exists, using a singleton makes sense as it makes it impossible to create multiple connections by error. 2. In this situation "ret" and "timeoutId" are the same variable. Note that "ret" is the value returned by the promise when calling to resolve().
Sorry for answering late, 1. You should clean up static properties though. Maybe that's ok for now but that's not clear for future updates. 2. That's still async, so `ret` should be removed on destroy.
No problem, for the number of complains in my issue tracker, it looks like Arch released GNOME 45 and I can imagine that means a ton of work for you. 1. I made the clean up of "instance" explicitly on extension disable: https://github.com/JoseExposito/gnome-shell-extension-x11gestures/commit/e2a54d2c9b8d4820d08fe9a76322a3c0720325d8 2. I simplified the code to avoid "coping" the "timeoutId" variable (it is an int, so no copies are involved, but hopefully it is more clear now): https://github.com/JoseExposito/gnome-shell-extension-x11gestures/commit/522ce388516ac790aea48327289c990bd9a74d7f
Thank you very much! Yeah, the review queue is always full recently. We sometimes have 40 extensions waiting for reviews.