From f10bcc7788fceb14232eb6d71885379fdd9d3ccc Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Fri, 24 Jul 2009 10:49:50 -0700 Subject: 190.18 --- src/gtk+-2.x/ctkgpu.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gtk+-2.x/ctkgpu.c b/src/gtk+-2.x/ctkgpu.c index ea10438..316d11d 100644 --- a/src/gtk+-2.x/ctkgpu.c +++ b/src/gtk+-2.x/ctkgpu.c @@ -290,8 +290,19 @@ GtkWidget* ctk_gpu_new( if (pData[0] == 0) { screens = g_strdup("None"); } else { + NvCtrlAttributeHandle *screen_handle; + if (xinerama_enabled) { screens = g_strdup("Screen 0 (Xinerama)"); + /* XXX Use the only screen handle we have. + * This is currently OK since we only + * query xinerama attributes with this + * handle below. If we needed to query + * a screen-specific attribute below, + * then we would need to get a handle + * for the correct screen instead. + */ + screen_handle = t[0].h; } else { for (i = 1; i <= pData[0]; i++) { if (screens) { @@ -303,9 +314,10 @@ GtkWidget* ctk_gpu_new( g_free(screens); screens = tmp_str; } + screen_handle = t[pData[1]].h; } - ret = NvCtrlGetAttribute(t[pData[1]].h, + ret = NvCtrlGetAttribute(screen_handle, NV_CTRL_SHOW_SLI_HUD, &tmp); if (ret == NvCtrlSuccess) { -- cgit v1.2.3