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 643064 - After switching resolutions, rounded corner on top bar is misplaced
After switching resolutions, rounded corner on top bar is misplaced
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-23 14:02 UTC by Steven Garrity
Modified: 2011-02-23 19:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of corner issue (25.22 KB, image/png)
2011-02-23 14:02 UTC, Steven Garrity
  Details
panel: Reposition corners on changes to the monitor layout (1.14 KB, patch)
2011-02-23 14:41 UTC, Florian Müllner
none Details | Review
panel: Add a relayout() method to position the panel (1.53 KB, patch)
2011-02-23 18:02 UTC, Florian Müllner
committed Details | Review
panel: Reposition corners on changes to the monitor layout (1.59 KB, patch)
2011-02-23 18:04 UTC, Florian Müllner
committed Details | Review

Description Steven Garrity 2011-02-23 14:02:08 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.
Comment 1 Florian Müllner 2011-02-23 14:41:43 UTC
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.
Comment 2 Owen Taylor 2011-02-23 15:11:57 UTC
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?
Comment 3 Florian Müllner 2011-02-23 15:16:22 UTC
(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.
Comment 4 Florian Müllner 2011-02-23 18:02:33 UTC
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.
Comment 5 Florian Müllner 2011-02-23 18:04:17 UTC
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 ...
Comment 6 Owen Taylor 2011-02-23 19:31:31 UTC
Review of attachment 181731 [details] [review]:

Looks good
Comment 7 Owen Taylor 2011-02-23 19:32:35 UTC
Review of attachment 181732 [details] [review]:

Looks good
Comment 8 Florian Müllner 2011-02-23 19:40:37 UTC
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