250
|
1 |
diff -rup compiz-0.5.0/configure.ac ../compiz-0.5.0.solaris/configure.ac
|
|
2 |
--- compiz-0.5.0/configure.ac 2007-04-02 20:48:18.000000000 +0200
|
|
3 |
+++ ../compiz-0.5.0.solaris/configure.ac 2007-04-20 10:54:54.011355000 +0200
|
|
4 |
@@ -83,12 +83,28 @@ AC_SUBST(plugindir)
|
|
5 |
imagedir=$datadir/compiz
|
|
6 |
AC_SUBST(imagedir)
|
|
7 |
|
|
8 |
+compiling_on_solaris=no
|
|
9 |
+case "$host" in
|
|
10 |
+ *-*-solaris*)
|
|
11 |
+ AC_MSG_CHECKING(if compiling on Solaris)
|
|
12 |
+ compiling_on_solaris=yes
|
|
13 |
+ use_xinerama=
|
|
14 |
+ AC_MSG_RESULT($compiling_on_solaris)
|
|
15 |
+ AC_DEFINE(SOLARIS, 1, [Compiling on Solaris enabled])
|
|
16 |
+ ;;
|
|
17 |
+ *)
|
|
18 |
+ use_xinerama="xinerama"
|
|
19 |
+ AC_DEFINE(HAVE_XORG_XINERAMA, 1, [Compiling with Xinerama enabled])
|
|
20 |
+ ;;
|
|
21 |
+esac
|
|
22 |
+
|
|
23 |
+
|
|
24 |
COMPIZ_REQUIRES="libpng \
|
|
25 |
+ $use_xinerama \
|
|
26 |
xcomposite \
|
|
27 |
xfixes \
|
|
28 |
xdamage \
|
|
29 |
xrandr \
|
|
30 |
- xinerama \
|
|
31 |
ice \
|
|
32 |
sm \
|
|
33 |
libstartup-notification-1.0 >= 0.7"
|
|
34 |
diff -rup compiz-0.5.0/include/compiz.h ../compiz-0.5.0.solaris/include/compiz.h
|
|
35 |
--- compiz-0.5.0/include/compiz.h 2007-04-02 20:15:28.000000000 +0200
|
|
36 |
+++ ../compiz-0.5.0.solaris/include/compiz.h 2007-04-20 10:54:54.012946000 +0200
|
|
37 |
@@ -35,7 +35,9 @@
|
|
38 |
#include <X11/Xutil.h>
|
|
39 |
#include <X11/extensions/Xdamage.h>
|
|
40 |
#include <X11/extensions/Xcomposite.h>
|
|
41 |
+#ifdef HAVE_XORG_XINERAMA
|
|
42 |
#include <X11/extensions/Xinerama.h>
|
|
43 |
+#endif
|
|
44 |
#include <X11/extensions/sync.h>
|
|
45 |
#include <X11/Xregion.h>
|
|
46 |
#include <X11/XKBlib.h>
|
|
47 |
@@ -718,12 +720,15 @@ struct _CompDisplay {
|
|
48 |
Bool xkbExtension;
|
|
49 |
int xkbEvent, xkbError;
|
|
50 |
|
|
51 |
+#ifdef HAVE_XORG_XINERAMA
|
|
52 |
Bool xineramaExtension;
|
|
53 |
int xineramaEvent, xineramaError;
|
|
54 |
|
|
55 |
XineramaScreenInfo *screenInfo;
|
|
56 |
+#endif
|
|
57 |
int nScreenInfo;
|
|
58 |
|
|
59 |
+
|
|
60 |
SnDisplay *snDisplay;
|
|
61 |
|
|
62 |
Atom supportedAtom;
|
|
63 |
diff -rup compiz-0.5.0/plugins/compiz.schemas.in ../compiz-0.5.0.solaris/plugins/compiz.schemas.in
|
|
64 |
--- compiz-0.5.0/plugins/compiz.schemas.in 2007-04-02 20:15:28.000000000 +0200
|
|
65 |
+++ ../compiz-0.5.0.solaris/plugins/compiz.schemas.in 2007-04-20 10:57:51.763850000 +0200
|
|
66 |
@@ -32049,7 +32049,7 @@
|
|
67 |
<applyto>/apps/compiz/plugins/zoom/allscreens/options/initiate_button</applyto>
|
|
68 |
<owner>compiz</owner>
|
|
69 |
<type>string</type>
|
|
70 |
- <default><Super>Button3</default>
|
|
71 |
+ <default>Disabled</default>
|
|
72 |
<locale name="C">
|
|
73 |
<short>Initiate</short>
|
|
74 |
<long>Zoom In</long>
|
|
75 |
@@ -32370,7 +32370,7 @@
|
|
76 |
<applyto>/apps/compiz/plugins/zoom/allscreens/options/zoom_in_button</applyto>
|
|
77 |
<owner>compiz</owner>
|
|
78 |
<type>string</type>
|
|
79 |
- <default><Super>Button4</default>
|
|
80 |
+ <default><Control>Button3</default>
|
|
81 |
<locale name="C">
|
|
82 |
<short>Zoom In</short>
|
|
83 |
<long>Zoom In</long>
|
|
84 |
Only in ../compiz-0.5.0.solaris/plugins: compiz.schemas.in~
|
|
85 |
diff -rup compiz-0.5.0/plugins/decoration.c ../compiz-0.5.0.solaris/plugins/decoration.c
|
|
86 |
--- compiz-0.5.0/plugins/decoration.c 2007-04-02 20:15:28.000000000 +0200
|
|
87 |
+++ ../compiz-0.5.0.solaris/plugins/decoration.c 2007-04-20 10:54:54.013685000 +0200
|
|
88 |
@@ -32,12 +32,12 @@
|
|
89 |
#include <string.h>
|
|
90 |
#include <math.h>
|
|
91 |
#include <unistd.h>
|
|
92 |
+#include <compiz.h>
|
|
93 |
+#include <decoration.h>
|
|
94 |
|
|
95 |
#include <X11/Xatom.h>
|
|
96 |
#include <X11/extensions/shape.h>
|
|
97 |
|
|
98 |
-#include <compiz.h>
|
|
99 |
-#include <decoration.h>
|
|
100 |
|
|
101 |
typedef struct _Vector {
|
|
102 |
int dx;
|
|
103 |
diff -rup compiz-0.5.0/plugins/video.c ../compiz-0.5.0.solaris/plugins/video.c
|
|
104 |
--- compiz-0.5.0/plugins/video.c 2007-04-02 20:15:30.000000000 +0200
|
|
105 |
+++ ../compiz-0.5.0.solaris/plugins/video.c 2007-04-20 10:54:54.015905000 +0200
|
|
106 |
@@ -29,10 +29,10 @@
|
|
107 |
#include <math.h>
|
|
108 |
#include <unistd.h>
|
|
109 |
|
|
110 |
+#include <compiz.h>
|
|
111 |
#include <X11/Xatom.h>
|
|
112 |
#include <X11/extensions/shape.h>
|
|
113 |
|
|
114 |
-#include <compiz.h>
|
|
115 |
#include <decoration.h>
|
|
116 |
|
|
117 |
#define VIDEO_YV12_DEFAULT TRUE
|
|
118 |
diff -rup compiz-0.5.0/src/cursor.c ../compiz-0.5.0.solaris/src/cursor.c
|
|
119 |
--- compiz-0.5.0/src/cursor.c 2007-04-02 20:15:30.000000000 +0200
|
|
120 |
+++ ../compiz-0.5.0.solaris/src/cursor.c 2007-04-20 10:54:54.016308000 +0200
|
|
121 |
@@ -26,6 +26,7 @@
|
|
122 |
#include <compiz.h>
|
|
123 |
|
|
124 |
#include <stdlib.h>
|
|
125 |
+#include "../config.h"
|
|
126 |
|
|
127 |
static void
|
|
128 |
setCursorMatrix (CompCursor *c)
|
|
129 |
@@ -53,7 +54,10 @@ addCursor (CompScreen *s)
|
|
130 |
|
|
131 |
updateCursor (c, 0, 0, 0);
|
|
132 |
|
|
133 |
+#ifdef SOLARIS
|
|
134 |
+#else
|
|
135 |
XFixesHideCursor (s->display->display, s->root);
|
|
136 |
+#endif
|
|
137 |
}
|
|
138 |
}
|
|
139 |
|
|
140 |
diff -rup compiz-0.5.0/src/display.c ../compiz-0.5.0.solaris/src/display.c
|
|
141 |
--- compiz-0.5.0/src/display.c 2007-04-02 20:15:30.000000000 +0200
|
|
142 |
+++ ../compiz-0.5.0.solaris/src/display.c 2007-04-20 10:54:54.017587000 +0200
|
|
143 |
@@ -738,6 +738,59 @@ shade (CompDisplay *d,
|
|
144 |
|
|
145 |
return TRUE;
|
|
146 |
}
|
|
147 |
+#ifdef SOLARIS
|
|
148 |
+#include <stdarg.h>
|
|
149 |
+#include <values.h>
|
|
150 |
+int asprintf(char **out, const char *fmt, ...)
|
|
151 |
+{
|
|
152 |
+ va_list ap;
|
|
153 |
+ int ret_status = EOF;
|
|
154 |
+ char dir_name[2001];
|
|
155 |
+ char file_name[2000];
|
|
156 |
+ FILE *fp = NULL;
|
|
157 |
+ char *work = NULL;
|
|
158 |
+
|
|
159 |
+ va_start(ap, fmt);
|
|
160 |
+
|
|
161 |
+ /* Warning: tmpfile() does not work well on Windows (MinGW)
|
|
162 |
+ * if user does not have write access on the drive where
|
|
163 |
+ * working dir is? */
|
|
164 |
+#ifdef __MINGW32__
|
|
165 |
+ /* file_name = G_tempfile(); */
|
|
166 |
+ GetTempPath ( 2000, dir_name );
|
|
167 |
+ GetTempFileName ( dir_name, "asprintf", 0, file_name );
|
|
168 |
+ fp = fopen ( file_name, "w+" );
|
|
169 |
+#else
|
|
170 |
+ fp = tmpfile();
|
|
171 |
+#endif /* __MINGW32__ */
|
|
172 |
+
|
|
173 |
+ if ( fp ) {
|
|
174 |
+ int count;
|
|
175 |
+
|
|
176 |
+ count = vfprintf(fp, fmt, ap);
|
|
177 |
+ if (count >= 0) {
|
|
178 |
+ work = calloc(count + 1, sizeof(char));
|
|
179 |
+ if (work != NULL) {
|
|
180 |
+ rewind(fp);
|
|
181 |
+ ret_status = fread(work, sizeof(char), count, fp);
|
|
182 |
+ if (ret_status != count) {
|
|
183 |
+ ret_status = EOF;
|
|
184 |
+ free(work);
|
|
185 |
+ work = NULL;
|
|
186 |
+ }
|
|
187 |
+ }
|
|
188 |
+ }
|
|
189 |
+ fclose(fp);
|
|
190 |
+#ifdef __MINGW32__
|
|
191 |
+ unlink ( file_name );
|
|
192 |
+#endif /* __MINGW32__ */
|
|
193 |
+ }
|
|
194 |
+ va_end(ap);
|
|
195 |
+ *out = work;
|
|
196 |
+
|
|
197 |
+ return ret_status;
|
|
198 |
+}
|
|
199 |
+#endif
|
|
200 |
|
|
201 |
static void
|
|
202 |
compDisplayInitOptions (CompDisplay *display,
|
|
203 |
@@ -2847,6 +2900,8 @@ addDisplay (char *name,
|
|
204 |
d->xkbEvent = d->xkbError = -1;
|
|
205 |
}
|
|
206 |
|
|
207 |
+ d->nScreenInfo = 0;
|
|
208 |
+#ifdef HAVE_XORG_XINERAMA
|
|
209 |
d->xineramaExtension = XineramaQueryExtension (dpy,
|
|
210 |
&d->xineramaEvent,
|
|
211 |
&d->xineramaError);
|
|
212 |
@@ -2859,6 +2914,7 @@ addDisplay (char *name,
|
|
213 |
d->screenInfo = NULL;
|
|
214 |
d->nScreenInfo = 0;
|
|
215 |
}
|
|
216 |
+#endif
|
|
217 |
|
|
218 |
compDisplays = d;
|
|
219 |
|
|
220 |
diff -rup compiz-0.5.0/src/option.c ../compiz-0.5.0.solaris/src/option.c
|
|
221 |
--- compiz-0.5.0/src/option.c 2007-04-02 20:15:30.000000000 +0200
|
|
222 |
+++ ../compiz-0.5.0.solaris/src/option.c 2007-04-20 10:54:54.017928000 +0200
|
|
223 |
@@ -30,6 +30,7 @@
|
|
224 |
#include <strings.h>
|
|
225 |
#include <ctype.h>
|
|
226 |
#include <math.h>
|
|
227 |
+#include "../config.h"
|
|
228 |
|
|
229 |
#include <compiz.h>
|
|
230 |
|
|
231 |
@@ -549,6 +550,29 @@ buttonBindingToString (CompDisplay
|
|
232 |
|
|
233 |
return binding;
|
|
234 |
}
|
|
235 |
+#ifdef SOLARIS
|
|
236 |
+#include <ctype.h>
|
|
237 |
+char *
|
|
238 |
+strcasestr (char *haystack, char *needle)
|
|
239 |
+{
|
|
240 |
+ char *p, *startn = 0, *np = 0;
|
|
241 |
+
|
|
242 |
+ for (p = haystack; *p; p++) {
|
|
243 |
+ if (np) {
|
|
244 |
+ if (toupper(*p) == toupper(*np)) {
|
|
245 |
+ if (!*++np)
|
|
246 |
+ return startn;
|
|
247 |
+ } else
|
|
248 |
+ np = 0;
|
|
249 |
+ } else if (toupper(*p) == toupper(*needle)) {
|
|
250 |
+ np = needle + 1;
|
|
251 |
+ startn = p;
|
|
252 |
+ }
|
|
253 |
+ }
|
|
254 |
+
|
|
255 |
+ return 0;
|
|
256 |
+}
|
|
257 |
+#endif
|
|
258 |
|
|
259 |
static unsigned int
|
|
260 |
stringToModifiers (CompDisplay *d,
|
|
261 |
diff -rup compiz-0.5.0/src/screen.c ../compiz-0.5.0.solaris/src/screen.c
|
|
262 |
--- compiz-0.5.0/src/screen.c 2007-04-02 20:15:30.000000000 +0200
|
|
263 |
+++ ../compiz-0.5.0.solaris/src/screen.c 2007-04-20 10:54:54.019035000 +0200
|
|
264 |
@@ -344,6 +344,7 @@ updateOutputDevices (CompScreen *s)
|
|
265 |
|
|
266 |
if (s->display->nScreenInfo)
|
|
267 |
{
|
|
268 |
+#ifdef HAVE_XORG_XINERAMA
|
|
269 |
for (i = 0; i < s->display->nScreenInfo; i++)
|
|
270 |
{
|
|
271 |
r.extents.x1 = s->display->screenInfo[i].x_org;
|
|
272 |
@@ -353,6 +354,7 @@ updateOutputDevices (CompScreen *s)
|
|
273 |
|
|
274 |
XUnionRegion (region, &r, region);
|
|
275 |
}
|
|
276 |
+#endif
|
|
277 |
}
|
|
278 |
else
|
|
279 |
{
|
|
280 |
@@ -397,6 +399,7 @@ detectOutputDevices (CompScreen *s)
|
|
281 |
if (!value.list.value)
|
|
282 |
return;
|
|
283 |
|
|
284 |
+#ifdef HAVE_XORG_XINERAMA
|
|
285 |
for (i = 0; i < n; i++)
|
|
286 |
{
|
|
287 |
snprintf (output, size, "%dx%d+%d+%d",
|
|
288 |
@@ -407,6 +410,7 @@ detectOutputDevices (CompScreen *s)
|
|
289 |
|
|
290 |
value.list.value[i].s = strdup (output);
|
|
291 |
}
|
|
292 |
+#endif
|
|
293 |
}
|
|
294 |
else
|
|
295 |
{
|
|
296 |
diff -rup compiz-0.5.0/src/window.c ../compiz-0.5.0.solaris/src/window.c
|
|
297 |
--- compiz-0.5.0/src/window.c 2007-04-02 20:15:30.000000000 +0200
|
|
298 |
+++ ../compiz-0.5.0.solaris/src/window.c 2007-04-20 10:54:54.020424000 +0200
|
|
299 |
@@ -1681,6 +1681,7 @@ updateWindowStruts (CompWindow *w)
|
|
300 |
int x1, y1, x2, y2;
|
|
301 |
int i;
|
|
302 |
|
|
303 |
+#ifdef HAVE_XORG_XINERAMA
|
|
304 |
/* applications expect us to clip struts to xinerama edges */
|
|
305 |
for (i = 0; i < w->screen->display->nScreenInfo; i++)
|
|
306 |
{
|
|
307 |
@@ -1725,6 +1726,7 @@ updateWindowStruts (CompWindow *w)
|
|
308 |
new.bottom.height = y2 - strutY1;
|
|
309 |
}
|
|
310 |
}
|
|
311 |
+#endif
|
|
312 |
}
|
|
313 |
|
|
314 |
if (hasOld != hasNew || (hasNew && hasOld &&
|