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

Not compatible with Gnome 3.32 #14

Open
GreyAsteroid opened this issue Apr 2, 2019 · 17 comments
Open

Not compatible with Gnome 3.32 #14

GreyAsteroid opened this issue Apr 2, 2019 · 17 comments

Comments

@GreyAsteroid
Copy link

Describe the bug
This extension does not work on Gnome 3.32

To Reproduce
Steps to reproduce the behavior:

  1. Use Gnome 3.32

Expected behavior
It to work.

@medenagan
Copy link
Owner

medenagan commented Apr 3, 2019

Hello,

there is some issue with

var PopupSliderMenuItem = new Lang.Class({
    Name: "WindowCornerPreview.PopupSliderMenuItem",
    Extends: PopupMenu.PopupBaseMenuItem,

Which extends the PopupBaseMenuItem class defined in popupMenu.js

The error is provoked by some changes in the GNOME shell api (maybe the switch from Lang classes to ES6 syntax?) but at the moment I don't have a clear idea of what's going on and how to easy fix it, sorry

EDIT:

It seems confirmed that a Lang class cannot inherit from a new ES6 class. WCP does use this approach, as such will break.

Porting to ES6 classes has the potential to break extensions (as it's
not possible to use Lang.Class to inherit from ES6 classes).

Prepare for porting to ES6 classes

@medenagan
Copy link
Owner

Ok guys, it seems only this class for now it's affected.

If you run GNOME 3.32: you can clone the repo, checkout the feat-ES6-porting branch and replace the ~/.local/share/gnome-shell/extensions/window-corner-preview@fabiomereu.it folder with a symbolic link to your local repo subfolder.

@jtojnar
Copy link

jtojnar commented Apr 17, 2019

👍 I tried the branch on NixOS and most things seem to be working:

  • turning preview on and off ✔️
  • focusing a window using both the menu and shift-click ✔️
    • I would expect the filled part of ◪ to indicate the window position, not the empty part ❓
  • switching between windows (including different desktops) ✔️
  • cropping, zoom using both menu and scrolling ✔️
  • moving preview using both menu and clicking (LMB, RMB, MMB) ✔️
  • shift hover keeps the preview visible with both behaviours ✔️
  • preferences
    • switching between hover behaviour works ✔️
    • the hide and seek behaviour is kind of unreliable (sometimes when I move mouse away, it reappears but then immediately disappears) https://gfycat.com/GiftedBriskIcelandicsheepdog
    • when I change behaviour to hide-and-seek, close the preferences, and re-open them, the see-through radio will be selected (the behaviour is still hide-and-seek) 🛑
    • hide when on top check box ✔️

No JavaScript errors in the journal.

@Mikuana
Copy link

Mikuana commented May 3, 2019

Ok guys, it seems only this class for now it's affected.

If you run GNOME 3.32: you can clone the repo, checkout the feat-ES6-porting branch and replace the ~/.local/share/gnome-shell/extensions/window-corner-preview@fabiomereu.it folder with a symbolic link to your local repo subfolder.

Instructions for fix work exactly as described for PopOS 19.04, which is running on Gnome 3.32.

@jsj1027
Copy link

jsj1027 commented Jun 1, 2019

Is this fix going to be merged into the main branch at any point soon?

@MasterGeekMX
Copy link

Ok guys, it seems only this class for now it's affected.

If you run GNOME 3.32: you can clone the repo, checkout the feat-ES6-porting branch and replace the ~/.local/share/gnome-shell/extensions/window-corner-preview@fabiomereu.it folder with a symbolic link to your local repo subfolder.

Tried on Fedora 30 Workstation. Didn't worked.

@jtojnar
Copy link

jtojnar commented Jun 2, 2019

Tried on Fedora 30 Workstation. Didn't worked.

What does that mean? The extension does not show up on the panel or it does and some menu items do not carry out the expected action? Do you see any errors in system journal after you enable the extension?

@medenagan
Copy link
Owner

medenagan commented Jun 2, 2019

Is this fix going to be merged into the main branch at any point soon?

Hi, this fix will break back compatibility (GNOME < 3.32) because class keyword could not be used on gjs before that.

Also, some users are still having errors with this fix on their distros. Once stabler distros switch to GNOME 3.32 and wider feedback is available the experimental branch will be merged.

EDIT: just to be clearer, older gjs versions will trigger a compiling error as they detect any class keyword on uncommented lines, so you can't put it on a conditional either.
Other GNOME shell classes have been wrapped up by the official team, so that older extensions can temporarily rely on the deprecated Lang.class way.

@virat-kumar
Copy link

Ok guys, it seems only this class for now it's affected.

If you run GNOME 3.32: you can clone the repo, checkout the feat-ES6-porting branch and replace the ~/.local/share/gnome-shell/extensions/window-corner-preview@fabiomereu.it folder with a symbolic link to your local repo subfolder.

I am using GNOME 3.32.2 on Manjaro disto
I git clone the feat-ES6-porting branch
Placed the folder in ~/.local/share/gnome-shell/extensions/
sadly, still dosen't wonk.
Any other way of fixing it ?

@jgierer12
Copy link

@vk001716 have you restarted the GNOME shell? You need to do that in order for the extension to show up in GNOME Tweaks and then enable it there.

@jonnyeom
Copy link

On the latest Manjaro stable build with Gnome 3.32.2,
This branch works for me.

@vk001716
I think what you may have dont is placed the entire repo in the directory.
Once you clone the code and switch to the feat-ES6 branch, there is a subdirectory called window-corner-preview@fabiomereu.it inside it. That is what should go to or link to in ~/.local/share/gnome-shell/extensions/.

e.g.

cd ~/project (or wherever you want to keep the project)
git clone https://github.com/medenagan/window-corner-preview.git .
git checkout -t origin/feat-ES6-porting
ln -s ~/project/window-corner-preview/window-corner-preview@fabiomereu.it ~/.local/share/gnome-shell/extensions/ (Swap out ~/project to wherever you put it)

Jonathan

@paulbauriegel
Copy link

@jonnyeom following you guide is still get an exception:

Extension "window-corner-preview@fabiomereu.it" had error: TypeError: this._construct is not a function

@jonnyeom
Copy link

jonnyeom commented Aug 7, 2019

@paulbauriegel
Where are you seeing this error?
Perhaps you need to restart gnome? (Alt+F2 to open dialog and enter r to restart)

@paulbauriegel
Copy link

Did that already, but still getting a error when loading the extension. Setting work for some reason. I'm seeing the Error in Alt+F2 -> lg, but no stacktrace unfortunately.

@jak
Copy link

jak commented Aug 12, 2019

I've packaged the ES6 branch here to simplify installation until a better option is found
https://extensions.gnome.org/extension/1937/window-corner-preview-332/

@paulbauriegel
Copy link

@jak Tried to install that extension, but I'm getting an exception during installation:
Extension "window-corner-preview@jak.io" had error: Error: Type name Gjs_WindowCornerPreview_indicator is already registered

@medenagan
Copy link
Owner

medenagan commented Aug 12, 2019 via email

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

No branches or pull requests