summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2015-02-24 07:56:00 -0800
committerAaron Plattner <aplattner@nvidia.com>2015-02-24 07:56:00 -0800
commitc15e4392b924c29d4388b925191dce9e3a46c98a (patch)
treedd710a01b9932e902f1a9b94bc421fdd7f9a3dfc
parenta993b9a192db1490e6388b9934627addf6e9cfc8 (diff)
346.47346.47
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c28
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributes.c30
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--version.mk2
8 files changed, 57 insertions, 13 deletions
diff --git a/doc/version.mk b/doc/version.mk
index ad8d06d..d622b1f 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 346.35
+NVIDIA_VERSION = 346.47
diff --git a/samples/version.mk b/samples/version.mk
index ad8d06d..d622b1f 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 346.35
+NVIDIA_VERSION = 346.47
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 5e6987b..7d7db48 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -3410,6 +3410,8 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
int val, tmp;
ReturnStatus ret;
gchar *primary_str = NULL;
+ gchar *screen_info = NULL;
+ GdkRectangle screen_parsed_info;
screen = (nvScreenPtr)calloc(1, sizeof(nvScreen));
@@ -3508,8 +3510,30 @@ static Bool layout_add_screen_from_server(nvLayoutPtr layout,
screen->depth = NvCtrlGetScreenPlanes(ctrl_target);
/* Initialize the virtual X screen size */
- screen->dim.width = NvCtrlGetScreenWidth(ctrl_target);
- screen->dim.height = NvCtrlGetScreenHeight(ctrl_target);
+ ret = NvCtrlGetStringAttribute(ctrl_target,
+ NV_CTRL_STRING_SCREEN_RECTANGLE,
+ &screen_info);
+ if (ret != NvCtrlSuccess) {
+ screen_info = NULL;
+ }
+
+ if (screen_info) {
+
+ /* Parse the positioning information */
+ screen_parsed_info.width = -1;
+ screen_parsed_info.height = -1;
+
+ parse_token_value_pairs(screen_info, apply_screen_info_token,
+ &screen_parsed_info);
+
+ if (screen_parsed_info.width >= 0 &&
+ screen_parsed_info.height >= 0) {
+
+ screen->dim.width = screen_parsed_info.width;
+ screen->dim.height = screen_parsed_info.height;
+ }
+ free(screen_info);
+ }
/* Add the screen to the layout */
layout_add_screen(layout, screen);
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index ad8d06d..d622b1f 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 346.35
+NVIDIA_VERSION = 346.47
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.c b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
index 748ddc4..4ce6145 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributes.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
@@ -393,8 +393,12 @@ int NvCtrlGetScreenWidth(const CtrlTarget *ctrl_target)
return -1;
}
+ if (h->target_id >= NvCtrlGetScreenCount(ctrl_target)) {
+ return -1;
+ }
+
return DisplayWidth(h->dpy, h->target_id);
-
+
} /* NvCtrlGetScreenWidth() */
@@ -411,8 +415,12 @@ int NvCtrlGetScreenHeight(const CtrlTarget *ctrl_target)
return -1;
}
+ if (h->target_id >= NvCtrlGetScreenCount(ctrl_target)) {
+ return -1;
+ }
+
return DisplayHeight(h->dpy, h->target_id);
-
+
} /* NvCtrlGetScreenHeight() */
@@ -519,8 +527,12 @@ int NvCtrlGetScreenWidthMM(const CtrlTarget *ctrl_target)
return -1;
}
+ if (h->target_id >= NvCtrlGetScreenCount(ctrl_target)) {
+ return -1;
+ }
+
return DisplayWidthMM(h->dpy, h->target_id);
-
+
} /* NvCtrlGetScreenWidthMM() */
@@ -537,8 +549,12 @@ int NvCtrlGetScreenHeightMM(const CtrlTarget *ctrl_target)
return -1;
}
+ if (h->target_id >= NvCtrlGetScreenCount(ctrl_target)) {
+ return -1;
+ }
+
return DisplayHeightMM(h->dpy, h->target_id);
-
+
} /* NvCtrlGetScreenHeightMM() */
@@ -555,8 +571,12 @@ int NvCtrlGetScreenPlanes(const CtrlTarget *ctrl_target)
return -1;
}
+ if (h->target_id >= NvCtrlGetScreenCount(ctrl_target)) {
+ return -1;
+ }
+
return DisplayPlanes(h->dpy, h->target_id);
-
+
} /* NvCtrlGetScreenPlanes() */
diff --git a/src/version.h b/src/version.h
index f2586a4..0fbccd5 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "346.35"
+#define NVIDIA_VERSION "346.47"
diff --git a/src/version.mk b/src/version.mk
index ad8d06d..d622b1f 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 346.35
+NVIDIA_VERSION = 346.47
diff --git a/version.mk b/version.mk
index ad8d06d..d622b1f 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 346.35
+NVIDIA_VERSION = 346.47