[AD] Bugfix if ALLEGRO_XWINDOWS_WITH_XCURSOR isn't defined by ./configure |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] Bugfix if ALLEGRO_XWINDOWS_WITH_XCURSOR isn't defined by ./configure
- From: Tobi Vollebregt <tobivollebregt@xxxxxxxxxx>
- Date: Sun, 17 Apr 2005 14:13:00 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=YVK7n95V8kw9MuUfeH/0//s9lI56GenGyXssjiw1cIdWtLQAd4UltacoL8PU+nlbFYxqoXMlhfT3MUb/nXHDg+oEzjq8T1bSmD4eImIvhRmKVhcD55E7yOUUMgdxcJJWlRcYKPTtlQ/BZzBD9/ZweQK03aVqyM1jovgOuhI5/g8=
Hi,
I got this error when compiling Allegro 4.2.0beta:
gcc -DHAVE_CONFIG_H -I. -Iinclude -Iinclude/allegro -I./include
-I./include/allegro -I/usr/X11R6/include -DALLEGRO_LIB_BUILD
-mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer
-Wall -Wno-unused -fPIC -DALLEGRO_SHARED -c ./src/x/xwin.c -o
obj/unix/shared/alleg/xwin.o
src/x/xwin.c: In function `_xwin_hide_x_mouse':
src/x/xwin.c:341: error: structure has no member named `xcursor_image'
src/x/xwin.c:342: warning: implicit declaration of function
`XcursorImageDestroy'
src/x/xwin.c:342: error: structure has no member named `xcursor_image'
src/x/xwin.c:343: error: structure has no member named `xcursor_image'
make: *** [obj/unix/shared/alleg/xwin.o] Error 1
./configure said:
checking for XcursorImageCreate in -lXcursor... no
I supposed this had something to do with it.
So I fixed the problem by adding a #ifdef
ALLEGRO_XWINDOWS_WITH_XCURSOR ... #endif block in x/xwin.c. Patch
attached.
Tobi Vollebregt,
tobivollebregt@xxxxxxxxxx
--- src/x/xwin.c Mon Mar 28 12:36:36 2005 UTC
+++ src/x/xwin.c Sun Apr 17 11:57:43 2005 UTC
@@ -338,10 +338,12 @@
_xwin.cursor = None;
}
+#ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR
if (_xwin.xcursor_image != None) {
XcursorImageDestroy(_xwin.xcursor_image);
_xwin.xcursor_image = None;
}
+#endif /* defined(ALLEGRO_XWINDOWS_WITH_XCURSOR) */
pixmap = XCreatePixmap(_xwin.display, _xwin.window, 1, 1, 1);
if (pixmap != None) {