display: use the preferred width and height when moving inactive displays
Inactive displays have a width and height of zero, so use the preferred width and height to allow correct positioning. https://bugzilla.gnome.org/show_bug.cgi?id=704404
This commit is contained in:
parent
55b212075f
commit
76c30cd6ef
1 changed files with 12 additions and 0 deletions
|
@ -1338,6 +1338,12 @@ list_edges_for_output (GnomeRROutputInfo *output, GArray *edges)
|
|||
|
||||
gnome_rr_output_info_get_geometry (output, &x, &y, &w, &h);
|
||||
|
||||
if (!gnome_rr_output_info_is_active (output))
|
||||
{
|
||||
h = gnome_rr_output_info_get_preferred_height (output);
|
||||
w = gnome_rr_output_info_get_preferred_width (output);
|
||||
}
|
||||
|
||||
apply_rotation_to_geometry (output, &w, &h);
|
||||
|
||||
/* Top, Bottom, Left, Right */
|
||||
|
@ -1538,6 +1544,12 @@ get_output_rect (GnomeRROutputInfo *output, GdkRectangle *rect)
|
|||
{
|
||||
gnome_rr_output_info_get_geometry (output, &rect->x, &rect->y, &rect->width, &rect->height);
|
||||
|
||||
if (!gnome_rr_output_info_is_active (output))
|
||||
{
|
||||
rect->width = gnome_rr_output_info_get_preferred_width (output);
|
||||
rect->height = gnome_rr_output_info_get_preferred_height (output);
|
||||
}
|
||||
|
||||
apply_rotation_to_geometry (output, &rect->width, &rect->height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue