[gnome-flashback] display-config: set the underscan border properties, too
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] display-config: set the underscan border properties, too
- Date: Wed, 29 Apr 2015 12:52:03 +0000 (UTC)
commit 8ff3f5233cb6f6a5b3b5b452676fc3c36c13196f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Apr 27 17:23:56 2015 -0700
display-config: set the underscan border properties, too
.../libdisplay-config/flashback-monitor-manager.c | 25 +++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
b/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
index 22c41cd..c770707 100644
--- a/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
+++ b/gnome-flashback/libdisplay-config/flashback-monitor-manager.c
@@ -1235,7 +1235,6 @@ output_set_underscanning_xrandr (FlashbackMonitorManagerPrivate *priv,
prop = XInternAtom (priv->xdisplay, "underscan", False);
- /* XXX: Also implement underscan border */
value = underscanning ? "on" : "off";
valueatom = XInternAtom (priv->xdisplay, value, False);
@@ -1244,6 +1243,30 @@ output_set_underscanning_xrandr (FlashbackMonitorManagerPrivate *priv,
prop,
XA_ATOM, 32, PropModeReplace,
(unsigned char*) &valueatom, 1);
+
+ /* Configure the border at the same time. Currently, we use a
+ * 5% of the width/height of the mode. In the future, we should
+ * make the border configurable. */
+ if (underscanning)
+ {
+ uint32_t border_value;
+
+ prop = XInternAtom (priv->xdisplay, "underscan hborder", False);
+ border_value = output->crtc->current_mode->width * 0.05;
+ XRRChangeOutputProperty (priv->xdisplay,
+ (XID)output->winsys_id,
+ prop,
+ XA_INTEGER, 32, PropModeReplace,
+ (unsigned char *) &border_value, 1);
+
+ prop = XInternAtom (priv->xdisplay, "underscan vborder", False);
+ border_value = output->crtc->current_mode->height * 0.05;
+ XRRChangeOutputProperty (priv->xdisplay,
+ (XID)output->winsys_id,
+ prop,
+ XA_INTEGER, 32, PropModeReplace,
+ (unsigned char *) &border_value, 1);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]