Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unhook function if obj._toucheggTracker is undefined #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kyrillzorin
Copy link

This fixes the "obj._toucheggTracker is undefined" error. This can happen if the extension is run under Wayland as obj._toucheggTracker is not initialized when the extension is enabled however it still tries to unhook it when disabling the extension.

May fix issue #57

This fixes the "obj._toucheggTracker is undefined" error.
This can happen if the extension is run under Wayland as obj._toucheggTracker is not initialized when the extension is enabled however it still tries to unhook it when disabling the extension.
Copy link
Owner

@JoseExposito JoseExposito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same fix I made in #57 (comment)
However, it didn't solve the problem.

The extension is not designed to work on Wayland, so I think it'd be a better idea to not start it at all if a Wayland session is in use.

@@ -164,6 +164,8 @@ class EntryPoint40Class extends GObject.Object {

static unhook(obj) {
/* eslint-disable no-underscore-dangle, no-param-reassign */
if (!obj._toucheggTracker)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{} are required to make the linter happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants