After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 581769 - Reorganize overlay hiding/showing code
Reorganize overlay hiding/showing code
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-07 17:11 UTC by Dan Winship
Modified: 2009-05-07 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reorganize overlay hiding/showing code (6.56 KB, patch)
2009-05-07 17:11 UTC, Dan Winship
reviewed Details | Review
Reorganize overlay hiding/showing code (6.95 KB, patch)
2009-05-07 20:43 UTC, Dan Winship
none Details | Review

Description Dan Winship 2009-05-07 17:11:06 UTC
This was inspired by the sidebar work. The sidebar has to hide itself when
the overlay is displayed, and reshow itself when the overlay is hidden.
But it has to reshow itself after the overlay *finishes* hiding, and there
was no non-hacky way to do that.

So this changes things around so that overlay.js is more in control of the
overlay show/hide process, and also so that it emits signals indicating its
state. So the sidebar code will be able to listen to 'showing' and 'hidden'
and DTRT.
Comment 1 Dan Winship 2009-05-07 17:11:10 UTC
Created attachment 134207 [details] [review]
Reorganize overlay hiding/showing code

Rather than having main.js manage this, put it into overlay.js, and
have the overlay object emit signals that other code can watch to do
things when the overlay is showing/shown/hiding/hidden.
Comment 2 Marina Zhurakhinskaya 2009-05-07 20:25:34 UTC
Your patch looks good. 

I just noticed that we have an overlayHidden() function in panel.js that never gets called. I think the intent of this function was to release the Activities button when the overlay is exited with an Esc key. Right now the button just stays pressed. Similarly, the button is not shown as pressed in when you enter the overlay by hitting the System key or Alt+F1, and gets pressed in if you click it to exit the overlay.

This can be easily fixed by adding a press() function to button.js, calling it when the 'showing' signal is emitted by the overlay, and calling the already existing release() function when the 'hiding' signal is emitted.

While these are not problems introduced by your patch, they can probably be addressed in it. At least the overlayHidden() function needs to be removed.

 
Comment 3 Dan Winship 2009-05-07 20:43:04 UTC
Created attachment 134221 [details] [review]
Reorganize overlay hiding/showing code

Ah, that's what overlayHidden() was for. I'd actually noticed it there
and removed it from my source tree right after filing this bug...

Add this:

    Main.overlay.connect('hiding', Lang.bind(this.button, this.button.release));

and it works.
Comment 4 Dan Winship 2009-05-07 21:04:37 UTC
committed after further irc discussion