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 drag and drop and select of workspace thumbnails in overview #270

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

Conversation

mzur
Copy link
Owner

@mzur mzur commented Nov 4, 2023

  • Fix drag and drop
  • Fix select

Resolves #177

This was originally implemented by @mainland.

The ThumbnailsBox base class only uses the x coordinate to test whether a point
is in a workspace. This is not sufficient when we may have multiple rows of
thumbnails.

The new _withinWorkspace function also uses the y coordinate. This requires
overriding handleDragOver as well so that it passes both the x and y coordinates
to _withinWorkspace.

References mainland@62be78e8
References #177
Copy link

@Francewhoa Francewhoa left a comment

Choose a reason for hiding this comment

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

Commit cb29bcc failed my tests. Extension can't be activated. With error message: import declarations may only appear at top level of a module


Below is the same as above. But with details if you're interested in those.


Steps to reproduce:

  1. This video shows all the steps below https://vk.com/video-225763421_456239018

  2. Using Extension Manager, try activating gnome-shell-wsmatrix 38 with commit cb29bcc

  3. The first challenge is that the extension can't be activated. The number 1 in this screenshot below shows this first challenge.
    Screenshot-342

  4. The second challenge is when trying to activate the extension, this error message is display within Extension Manager import declarations may only appear at top level of a module. The number 2 in this screenshot above shows error message.

  5. The needed end result is that users are able to activate the extension without error message


Used

• gnome-shell-wsmatrix 38 with commit cb29bcc
• Debian 12 Bookworm
• GNOME 43.9
Extension Manager 0.4.3
• Type 64 bits
• Wayland


What I tried that did not work

  • Deactivated all GNOME extensions. Except gnome-shell-wsmatrix 38 with commit cb29bcc

  • Fresh GNOME session

  • Restart device

  • Used gnome-shell-wsmatrix 38, replaced only the file thumbnailsBox.js with commit cb29bcc

  • Replaced all files and all folders of gnome-shell-wsmatrix 38. Which included patched file thumbnailsBox.js.

@mzur
Copy link
Owner Author

mzur commented May 1, 2024

Sorry for the late reply. Could you please run journalctl /usr/bin/gnome-shell and try to spot the error message there? It should give an indication from which file the error was thrown.

@Francewhoa
Copy link

@mzur :) Thanks for both your reply and contribution to WSM :) I'll try. Then post the result here.

@Francewhoa
Copy link

Francewhoa commented May 1, 2024

@mzur Done

14:44:25 gnome-character: JS LOG: Characters Application exiting
14:44:22 gnome-shell: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
14:44:21 gnome-logs: gtk_label_set_label: assertion 'GTK_IS_LABEL (self)' failed
14:44:21 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Logs'
14:44:21 gnome-shell: Object .Gjs_activitiesworkspacename_ahmafi_ir_extension_ActivitiesButton (0x55fb10f508f0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
14:44:21 dbus-daemon: [session uid=1000 pid=2923] Activating service name='org.gnome.Logs' requested by ':1.21' (uid=1000 pid=3459 comm="/usr/bin/gnome-shell")
14:44:18 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 gnome-character: JS LOG: Characters Application started
14:44:15 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Calculator.SearchProvider'
14:44:15 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.clocks'
14:44:14 gnome-shell: Object .Gjs_activitiesworkspacename_ahmafi_ir_extension_ActivitiesButton (0x55fb10f508f0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
14:43:32 gnome-character: JS LOG: Characters Application exiting
14:43:24 gnome-shell: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
14:43:24 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Shell.Extensions'
14:43:24 systemd: Started app-flatpak-com.mattjakeman.ExtensionManager-6324.scope.


Below is the same as above. But with detailed steps if you're interested in those.


Steps

  1. This video shows all the steps below https://vk.com/video-225763421_456239018

  2. Used gnome-shell-wsmatrix 38, replaced only the file thumbnailsBox.js with commit cb29bcc

  3. Deactivated all GNOME extensions. Except gnome-shell-wsmatrix 38 with commit cb29bcc

  4. Fresh GNOME session

  5. Using Extension Manager 0.5.0 try to activate gnome-shell-wsmatrix It can't be activated. The number 1 in this screenshot up above shows this challenge.

    • Note to self. In the log below, I did this action right after 14:44:00 (2:44 pm)
  6. I tried journalctl /usr/bin/gnome-shell but it is hard to find and export any valuable information from the result. So I used the Debian built-in GNOME Logs. Which has a very easy export button. Events are listed from most recent to oldest. Time format is 24 hours.

14:44:25 gnome-character: JS LOG: Characters Application exiting
14:44:22 gnome-shell: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
14:44:21 gnome-logs: gtk_label_set_label: assertion 'GTK_IS_LABEL (self)' failed
14:44:21 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Logs'
14:44:21 gnome-shell: Object .Gjs_activitiesworkspacename_ahmafi_ir_extension_ActivitiesButton (0x55fb10f508f0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
14:44:21 dbus-daemon: [session uid=1000 pid=2923] Activating service name='org.gnome.Logs' requested by ':1.21' (uid=1000 pid=3459 comm="/usr/bin/gnome-shell")
14:44:18 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 gnome-character: JS LOG: Characters Application started
14:44:15 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Calculator.SearchProvider'
14:44:15 gnome-shell: Received error from D-Bus search provider org.gnome.Terminal.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’objet n’existe pas à l’emplacement « /org/gnome/Terminal/SearchProvider »
14:44:15 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.clocks'
14:44:14 gnome-shell: Object .Gjs_activitiesworkspacename_ahmafi_ir_extension_ActivitiesButton (0x55fb10f508f0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
14:43:32 gnome-character: JS LOG: Characters Application exiting
14:43:24 gnome-shell: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
14:43:24 dbus-daemon: [session uid=1000 pid=2923] Successfully activated service 'org.gnome.Shell.Extensions'
14:43:24 systemd: Started app-flatpak-com.mattjakeman.ExtensionManager-6324.scope.

@mzur
Copy link
Owner Author

mzur commented May 2, 2024

Thanks! Unfortunately, I don't see the "import declarations" error message there. Maybe it is reported by some other process. You can search the whole journal by executing journalctl, then entering the / character, typing part of the error message (e.g. import declarations) and finally pressing Enter. This will search the journal for the error message (which could take a while).

@Francewhoa
Copy link

I don't see the "import declarations" error message there

Good morning @mzur :) Find my reply at #280 (comment)

I created this ticket #280 to facilitate communications about this pull request #270. I'm assuming that it is easier to resolve a challenge if there is one challenge per ticket.

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.

Fix workspace thumbnails box size in overview
2 participants