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 731166 - display: Fix alignment when rotating displays
display: Fix alignment when rotating displays
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-03 16:25 UTC by Bastien Nocera
Modified: 2014-06-05 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
display: Split out rotation sanity checking (1.81 KB, patch)
2014-06-03 16:25 UTC, Bastien Nocera
committed Details | Review
display: Check whether the rotation changes when relayouting (2.82 KB, patch)
2014-06-03 16:25 UTC, Bastien Nocera
none Details | Review
display: Move apply_rotation_to_geometry() (1.76 KB, patch)
2014-06-03 16:25 UTC, Bastien Nocera
committed Details | Review
display: Fix problems when left-most monitor is rotated (2.41 KB, patch)
2014-06-03 16:25 UTC, Bastien Nocera
committed Details | Review
display: Remove shadowing variable (782 bytes, patch)
2014-06-03 16:25 UTC, Bastien Nocera
committed Details | Review
display: Check whether the rotation changes when relayouting (3.06 KB, patch)
2014-06-04 15:00 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-06-03 16:25:02 UTC
.
Comment 1 Bastien Nocera 2014-06-03 16:25:06 UTC
Created attachment 277808 [details] [review]
display: Split out rotation sanity checking
Comment 2 Bastien Nocera 2014-06-03 16:25:12 UTC
Created attachment 277809 [details] [review]
display: Check whether the rotation changes when relayouting

Otherwise we'll end up with a huge gap between monitors when
rotating the leftmost.
Comment 3 Bastien Nocera 2014-06-03 16:25:18 UTC
Created attachment 277811 [details] [review]
display: Move apply_rotation_to_geometry()
Comment 4 Bastien Nocera 2014-06-03 16:25:24 UTC
Created attachment 277812 [details] [review]
display: Fix problems when left-most monitor is rotated

When rotating the left-most monitor, we could end up with one
of two scenarios:
- Huge gap between monitor one and two when the left monitor is made
to be vertical
- Monitor two overlapping on top of monitor one when monitor is
back to being horizontal.

In addition to adding a bit more debug, we now take the old and new
rotation of monitor one into account when calculating the moving
screen edges.
Comment 5 Bastien Nocera 2014-06-03 16:25:33 UTC
Created attachment 277813 [details] [review]
display: Remove shadowing variable
Comment 6 Bastien Nocera 2014-06-04 15:00:21 UTC
Created attachment 277883 [details] [review]
display: Check whether the rotation changes when relayouting

Consider whether rotation has changed when checking whether
we need to relayout the screens. Before, we would only have changed the
layout if the resolution changed.

This doesn't fix the problem of the relayouting code not taking rotation
into account, but it will at least allow us to run that code when only
the rotation changes.
Comment 7 Thomas Wood 2014-06-05 15:13:13 UTC
The patches look good to me. Existing misaligned configurations do not get corrected, but that is probably a separate issue.
Comment 8 Bastien Nocera 2014-06-05 15:18:23 UTC
Pushed to master and gnome-3-12 after review by Thomas Wood

Attachment 277808 [details] pushed as 1e6ea54 - display: Split out rotation sanity checking
Attachment 277811 [details] pushed as 27fa69a - display: Move apply_rotation_to_geometry()
Attachment 277812 [details] pushed as 42b1209 - display: Fix problems when left-most monitor is rotated
Attachment 277813 [details] pushed as b50e712 - display: Remove shadowing variable
Attachment 277883 [details] pushed as 4ab4c18 - display: Check whether the rotation changes when relayouting