GNOME Bugzilla – Bug 643064
After switching resolutions, rounded corner on top bar is misplaced
Last modified: 2011-02-23 19:40:51 UTC
Created attachment 181695 [details] Screenshot of corner issue After docking my laptop and switching to an external display with a larger resolution (switched using nvidia-settings - using the proprietary nvidia drivers, unfortunately), the top right rounded corner on the top black bar of the gnome shell is in the wrong place. See the attached screenshot. After a minute or two, it switched back to the right place - I'm not sure if it was after going into Activities mode - I didn't notice exactly when it fixed itself.
Created attachment 181698 [details] [review] panel: Reposition corners on changes to the monitor layout When the monitor layout changes, the panel might have been moved to another monitor, in which case the rounded corners need to be repositioned.
Review of attachment 181698 [details] [review]: ::: js/ui/panel.js @@ +565,3 @@ + Lang.bind(this, function() { + this._reposition(); + this.actor.queue_redraw(); why the queue_redraw?
(In reply to comment #2) > why the queue_redraw? Because otherwise the corners won't appear on the second monitor until something else (e.g. activating the corresponding button triggering a style change) queues a redraw. It might make sense to move the call into _reposition() instead.
Created attachment 181731 [details] [review] panel: Add a relayout() method to position the panel Currently the panel is positioned from main.js, move that code into a method in panel.js instead and call it from main.js, which is consistent with what we do for the overview.
Created attachment 181732 [details] [review] panel: Reposition corners on changes to the monitor layout So the previous approach was wrong - the corner ended up being repositioned before the panel's position changed. No idea really why the queue_redraw() call "fixed" it, but well ...
Review of attachment 181731 [details] [review]: Looks good
Review of attachment 181732 [details] [review]: Looks good
Attachment 181731 [details] pushed as 172d68d - panel: Add a relayout() method to position the panel Attachment 181732 [details] pushed as ff171e3 - panel: Reposition corners on changes to the monitor layout