hotCorner modification breaks official apps-menu extension

Bug #1725941 reported by Matthew D. Mower
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell-extensions (Ubuntu)
In Progress
Low
Unassigned

Bug Description

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/6

---

Ubuntu 17.10 x64
Activities Overview Hot Corner disabled using Gnome Tweaks

When hot corners are disabled, the official Gnome Extension "Applications Menu"
 (https://extensions.gnome.org/extension/6/applications-menu/) is broken -- error shows when attempting to enable extensions and clicking menu does nothing. A small fix to the extension was suggested to the developer "Apps-menu crashes when there is no hotcorner"
 (https://bugzilla.gnome.org/show_bug.cgi?id=712625) but his response is that this problem does not fall in his court, at least while "dconf config option for disabling the activities hot corner" (https://bugzilla.gnome.org/show_bug.cgi?id=688320) is still open.

Changed in gnome-shell:
importance: Unknown → Low
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Unsure what we can do if upstream is not wanting to update their extension to handle that case well just to make a point, maybe somebody should create a new one including the suggested change?

Changed in gnome-shell (Ubuntu):
importance: Undecided → Low
Revision history for this message
Matthew D. Mower (mdmower) wrote :

The issue appears to stem from the Main.layoutManager.hotCorners[] array being empty when hot corners are disabled:
https://git.gnome.org/browse/gnome-shell-extensions/tree/extensions/apps-menu/extension.js?id=01893ca0485806f181d0401b7a6347a4adaa71de#n483

Would it be possible to leave the Main.layoutManager.hotCorners[] array defined and disable the activity overview by substituting no-op functions for actions? This is how the "No Topleft Hot Corner" extension works: https://github.com/HROMANO/nohotcorner/blob/f02c0398fe59202ba01b35ae04f8fe1fb46008e1/extension.js#L7

Revision history for this message
Matthew D. Mower (mdmower) wrote :

In fact, I'm not sure if this is this a bug with gnome-shell or with gnome-tweak-tool and the method it uses to disable hot corners.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Someone could always attempt a proper fix and propose it upstream. If upstream don't have to do the work then they might be more accepting of a fix.

Changed in gnome-shell:
status: Confirmed → Expired
Revision history for this message
Denis Gorodnichev (d-g) wrote :

introduced by optional-hot-corner.patch

fix:

diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index adc77a4..939a07c 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -240,17 +240,21 @@ class ApplicationsMenu extends PopupMenu.PopupMenu {
     }

     open(animate) {
- this._button.hotCorner.setBarrierSize(0);
- if (this._button.hotCorner.actor) // fallback corner
- this._button.hotCorner.actor.hide();
- super.open(animate);
+ if (this._button.hotCorner) {
+ this._button.hotCorner.setBarrierSize(0);
+ if (this._button.hotCorner.actor) // fallback corner
+ this._button.hotCorner.actor.hide();
+ super.open(animate);
+ }
     }

     close(animate) {
         let size = Main.layoutManager.panelBox.height;
- this._button.hotCorner.setBarrierSize(size);
- if (this._button.hotCorner.actor) // fallback corner
- this._button.hotCorner.actor.show();
+ if (this._button.hotCorner) {
+ this._button.hotCorner.setBarrierSize(size);
+ if (this._button.hotCorner.actor) // fallback corner
+ this._button.hotCorner.actor.show();
+ }
         super.close(animate);
     }

Revision history for this message
Denis Gorodnichev (d-g) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "hotcorner.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Denis,

Please propose your fix to the developers here:

  https://gitlab.gnome.org/GNOME/gnome-shell-extensions

affects: gnome-shell (Ubuntu) → gnome-shell-extensions (Ubuntu)
Changed in gnome-shell-extensions (Ubuntu):
status: New → In Progress
assignee: nobody → Denis Gorodnichev (d-g)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, the upstream bug report ID is gnome-shell-extensions#6

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/6

description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
no longer affects: gnome-shell
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note this is not an SRU. The fix needs to land in the latest development release first (19.04).

Revision history for this message
Denis Gorodnichev (d-g) wrote :
Denis Gorodnichev (d-g)
Changed in gnome-shell-extensions (Ubuntu):
assignee: Denis Gorodnichev (d-g) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.