do-sch / gnome-shell-touchpad-window-move

GNOME Extension that allows moving windows with three finger trackpad gestures
GNU General Public License v3.0
24 stars 6 forks source link

compatibility with gnome 3.32-3.34-3.36 on some code #6

Closed laverdone closed 4 years ago

laverdone commented 4 years ago

I'm modify extension.js like this:

if(Clutter.DeviceManager.get_default()){
        const deviceManager = Clutter.DeviceManager.get_default();
        this._virtualTouchpad = deviceManager.create_virtual_device(Clutter.InputDeviceType.TOUCHPAD_DEVICE);
            this._virtualKeyboard = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
    }else{
        const seat = Clutter.get_default_backend().get_default_seat();
        this._virtualTouchpad = seat.create_virtual_device(Clutter.InputDeviceType.POINTER_DEVICE);
            this._virtualKeyboard = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
    }

and metadata.json like this

{
    "name": "Three Finger Window Move", 
    "description": "Allows moving windows around with a three finger trackpad gesture (Wayland only)", 
    "url": "https://github.com/do-sch/gnome-shell-touchpad-window-move",
    "uuid": "threefingerwindowmove@do.sch.dev.gmail.com", 
    "shell-version": ["3.32", "3.34","3.36"]
}

to work on different version.
do-sch commented 4 years ago

Thanks for the good suggestion. I implemented it. But it will likely take a few hours for it to arrive in the store.