GNOME Bugzilla – Bug 645759
Clicking on Activities with menu up leaves a funny state
Last modified: 2011-07-14 19:32:07 UTC
Reported by David Le Sage in https://bugzilla.redhat.com/show_bug.cgi?id=683685 === If you click on a GNOME Bar/Panel item, such as the Desktop clock and then (while it is still down) go and click on the Activities area, nothing happens. GNOME does not switch to Overlay mode, even if you click it several times. Steps to Reproduce: 1. Click on the Desktop clock (or any other Panel drop-down, such as the current app indicator.) 2. With that menu down, go and click on Activities. === Reproduced with the latest code in Git.
Worth noting that you won't even get the prelight and keyboard nav won't work on it either after a click. But keyboard nav does work properly using Ctrl+Alt+Tab to select the Top Panel.
This may be related: I can see Activities flash to it's "activated" state when then popupmenu is dismissed.
*** Bug 647282 has been marked as a duplicate of this bug. ***
Created attachment 187059 [details] [review] activitiesButton: abstract this out of panel.js Move the HotCorner and ActivitiesButton code out of panel.js
Created attachment 187060 [details] [review] activitiesButton: make this a PanelMenu.Button The fact that everything in the top bar except the activities button was a menu made various things difficult. Simplify this by making the activities button be a menu too, but just hack it up a bit so that the menu associated with the button never actually appears. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=645759 (Clicking on Activities with menu up leaves a funny state) and https://bugzilla.gnome.org/show_bug.cgi?id=641253 (panel keynav between Activities and menus is quirky).
*** Bug 652591 has been marked as a duplicate of this bug. ***
Created attachment 190814 [details] [review] activitiesButton: make this a PanelMenu.Button ==== updated, improved a bit. There is one oddity, which is that if the menus are up, and you click on the Activities button, then the menus go away, but it does not enter the overview. This is essentially the same oddity as the (pre-existing) bug that if you press on the menu title for the currently-open menu, that menu hides immediately (rather than waiting for the button release). But I'll fix that after bug 643687 lands.
*** Bug 641253 has been marked as a duplicate of this bug. ***
Created attachment 191969 [details] [review] panel: abstract ActivitiesButton into its own class
Created attachment 191970 [details] [review] panel: make ActivitiesButton a PanelMenu.Button The fact that everything in the top bar except the activities button was a menu made various things difficult. Simplify this by making the activities button be a menu too, but just hack it up a bit so that the menu associated with the button never actually appears. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=645759 (Clicking on Activities with menu up leaves a funny state) and its semi-dup 641253 (panel keynav between Activities and menus is quirky).
Created attachment 191971 [details] [review] panel, layout: clean up HotCorner handling Move the HotCorner class from panel to layout, and make the panel manage its own HotCorner. Stick the panel's HotCorner into the Activities button actor (rather than separately floating above it), so that hover tracking on the button works properly without needing hacks in HotCorner.
Review of attachment 191971 [details] [review]: Not a full review, only pointing out the errors which prevent the code from running ... ::: js/ui/layout.js @@ +194,3 @@ + if (St.Widget.get_default_direction() == St.TextDirection.RTL) { + this._corner.set_position(this.actor.width - this._corner.width, 0); + this.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST Missing ); @@ +292,3 @@ + if (this.shouldToggleOverviewOnClick()) + Main.overview.toggle(); + ret urn true; ... ::: js/ui/panel.js @@ +568,3 @@ + container.add_actor(this._label); + + this._hotCorner = new HotCorner(); Layout.HotCorner?
I will not do a "trivial" rebase and then submit a patch without testing. I will not do a "trivial" rebase and then submit a patch without testing. I will not do a "trivial" rebase and then submit a patch without testing. I will not do a "trivial" rebase and then submit a patch without testing. ...
Created attachment 191980 [details] [review] panel, layout: clean up HotCorner handling Move the HotCorner class from panel to layout, and make the panel manage its own HotCorner. Stick the panel's HotCorner into the Activities button actor (rather than separately floating above it), so that hover tracking on the button works properly without needing hacks in HotCorner.
Review of attachment 191969 [details] [review]: Looks good! ::: js/ui/panel.js @@ +978,3 @@ /* Button on the left side of the panel. */ + this._activitiesButton = new ActivitiesButton(); + this._activities = this.button = this._activitiesButton.actor; Maybe a good time to get rid of the overly generic 'this.button'?
Review of attachment 191970 [details] [review]: Looking good ::: data/theme/gnome-shell.css @@ +266,2 @@ .panel-corner:active, .panel-corner:checked, time to remove :checked? @@ +304,2 @@ .panel-button:active, .panel-button:checked, Dto.
Review of attachment 191980 [details] [review]: Looks good except for a minor style breakage (when toggling the activities button, the highlight effect on the button is out-of-sync with the effect on corner). ::: js/ui/panel.js @@ +565,3 @@ /* Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview". */ + this._label = new St.Label({ name: 'panelActivities', This change breaks the existing CSS - either the CSS needs adjustment, or the name should be left to this.actor. @@ -1031,3 @@ /* Button on the left side of the panel. */ this._activitiesButton = new ActivitiesButton(); - this._activities = this.button = this._activitiesButton.actor; Ah, never mind the earlier comment about removing this.button.
pushed with the fixes you pointed out Attachment 191969 [details] pushed as 544bdb4 - panel: abstract ActivitiesButton into its own class Attachment 191970 [details] pushed as 50f248e - panel: make ActivitiesButton a PanelMenu.Button Attachment 191980 [details] pushed as 0549f42 - panel, layout: clean up HotCorner handling