[gnome-control-center] display: Add support for tiled monitors
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: Add support for tiled monitors
- Date: Wed, 1 Jul 2015 08:51:47 +0000 (UTC)
commit 458cebb26d8f9350e79b7235308b42820306f835
Author: Dave Airlie <airlied redhat com>
Date: Wed Oct 15 17:24:03 2014 +1000
display: Add support for tiled monitors
The display panel needs to ask libgnome-desktop in a few places
whether the panel is tiled.
https://bugzilla.gnome.org/show_bug.cgi?id=751680
configure.ac | 2 +-
panels/display/cc-display-panel.c | 23 ++++++++++++++++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0e46c2f..c5e4bdd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,7 +96,7 @@ NETWORK_MANAGER_REQUIRED_VERSION=0.9.8
NETWORK_MANAGER_APPLET_REQUIRED_VERSION=0.9.7.995
MODEM_MANAGER_REQUIRED_VERSION=0.7
LIBNOTIFY_REQUIRED_VERSION=0.7.3
-GNOME_DESKTOP_REQUIRED_VERSION=3.11.3
+GNOME_DESKTOP_REQUIRED_VERSION=3.17.4
SCHEMAS_REQUIRED_VERSION=3.15.4
LIBWACOM_REQUIRED_VERSION=0.7
CLUTTER_REQUIRED_VERSION=1.11.3
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 072429b..6906979 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -509,6 +509,9 @@ on_screen_changed (CcDisplayPanel *panel)
{
GnomeRROutput *output;
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
+
output = gnome_rr_screen_get_output_by_name (priv->screen,
gnome_rr_output_info_get_name (outputs[i]));
@@ -660,6 +663,9 @@ realign_outputs_after_resolution_change (CcDisplayPanel *self, GnomeRROutputInfo
if (outputs[i] == output_that_changed || !gnome_rr_output_info_is_connected (outputs[i]))
continue;
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
+
gnome_rr_output_info_get_geometry (outputs[i], &output_x, &output_y, &output_width, &output_height);
if (output_x >= old_right_edge)
@@ -743,6 +749,9 @@ list_connected_outputs (CcDisplayPanel *self, int *total_w, int *total_h)
outputs = gnome_rr_config_get_outputs (self->priv->current_configuration);
for (i = 0; outputs[i] != NULL; ++i)
{
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
+
if (gnome_rr_output_info_is_connected (outputs[i]))
{
int w, h;
@@ -844,7 +853,11 @@ list_edges (GnomeRRConfig *config, GArray *edges)
for (i = 0; outputs[i]; ++i)
{
if (gnome_rr_output_info_is_connected (outputs[i]))
- list_edges_for_output (outputs[i], edges);
+ {
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
+ list_edges_for_output (outputs[i], edges);
+ }
}
}
@@ -1041,6 +1054,8 @@ output_overlaps (GnomeRROutputInfo *output, GnomeRRConfig *config)
outputs = gnome_rr_config_get_outputs (config);
for (i = 0; outputs[i]; ++i)
{
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
if (outputs[i] != output && gnome_rr_output_info_is_connected (outputs[i]))
{
GdkRectangle other_rect;
@@ -1064,6 +1079,8 @@ gnome_rr_config_is_aligned (GnomeRRConfig *config, GArray *edges)
outputs = gnome_rr_config_get_outputs (config);
for (i = 0; outputs[i]; ++i)
{
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
if (gnome_rr_output_info_is_connected (outputs[i]))
{
if (!output_is_aligned (outputs[i], edges))
@@ -1453,6 +1470,10 @@ compute_virtual_size_for_configuration (GnomeRRConfig *config, int *ret_width, i
outputs = gnome_rr_config_get_outputs (config);
for (i = 0; outputs[i] != NULL; i++)
{
+
+ if (!gnome_rr_output_info_is_primary_tile (outputs[i]))
+ continue;
+
if (gnome_rr_output_info_is_active (outputs[i]))
{
gnome_rr_output_info_get_geometry (outputs[i], &output_x, &output_y, &output_width, &output_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]