aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-03-23 11:03:08 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-03-23 11:03:08 (GMT)
commit9086ccafbec2c694abcf7c56814df61b05924103 (patch)
treeea611fda0680a2e70f7c0dd000ae3c912f78814c
parente850b0191977da47eb7233e248dbab7ebd1d21f0 (diff)
downloadfluxbox-9086ccafbec2c694abcf7c56814df61b05924103.zip
fluxbox-9086ccafbec2c694abcf7c56814df61b05924103.tar.bz2
compile fix: sunCC again, wants a compile time constant for arrays
-rw-r--r--src/FbTk/ImageControl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index 00f566d..a5e5cd1 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -111,14 +111,14 @@ void allocateUnallocatedColors(std::vector<XColor> colors, Display* dpy, Colorma
111 // 'icolors' will hold the first 'nr_icolors' colors of the 111 // 'icolors' will hold the first 'nr_icolors' colors of the
112 // given (indexed) colormap. 112 // given (indexed) colormap.
113 const size_t nr_icolors = std::min(256, 1 << screen_depth); 113 const size_t nr_icolors = std::min(256, 1 << screen_depth);
114 XColor icolors[nr_icolors]; 114 std::vector<XColor> icolors(nr_icolors);
115 115
116 // give each icolor an index 116 // give each icolor an index
117 for (i = 0; i < nr_icolors; i++) 117 for (i = 0; i < nr_icolors; i++)
118 icolors[i].pixel = i; 118 icolors[i].pixel = i;
119 119
120 // query the colors of the colormap and store them into 'icolors' 120 // query the colors of the colormap and store them into 'icolors'
121 XQueryColors(dpy, cmap, icolors, nr_icolors); 121 XQueryColors(dpy, cmap, &icolors[0], nr_icolors);
122 122
123 // try to find a close color for all not allocated colors 123 // try to find a close color for all not allocated colors
124 for (i = 0; i < colors.size(); i++) { 124 for (i = 0; i < colors.size(); i++) {