|
From: <mla...@us...> - 2007-01-01 20:51:39
|
Revision: 239
http://svn.sourceforge.net/g15daemon/?rev=239&view=rev
Author: mlampard
Date: 2007-01-01 12:51:40 -0800 (Mon, 01 Jan 2007)
Log Message:
-----------
ensure compilability even if xtest extension devel packages arent found.
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/configure.in
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-01-01 20:51:40 UTC (rev 239)
@@ -3,3 +3,4 @@
SVN
- added ability to scroll through playlist and play selected songs with the
volume control/play button.
+- best used with g15daemon wip
Modified: trunk/g15daemon-audio-plugins/g15mpd/configure.in
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-01-01 20:51:40 UTC (rev 239)
@@ -12,10 +12,12 @@
AC_PROG_RANLIB
AC_CHECK_LIB([g15daemon_client], [g15daemon_version],,AC_MSG_ERROR(["libg15daemon_client (or its devel package) not found. please install it"]))
+AC_CHECK_LIB([Xtst],[XTestQueryExtension],,AC_MSG_ERROR(["Xorg XTest extension library not found. please install it"]))
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(g15daemon_client.h libg15render.h,,AC_MSG_ERROR(["libg15daemon_client (or its devel package) could not be found. please install it"]))
AC_CHECK_HEADERS(X11/Xlib.h X11/XF86keysym.h,,AC_MSG_ERROR(["Xorg development files could not be found. please install the devel package"]))
+AC_CHECK_HEADERS(X11/extensions/XTest.h,,AC_MSG_ERROR(["Xorg XTEST Extension devel headers could not be found. please install the devel package"]))
AC_CHECK_HEADERS(libmpd/libmpd.h,,AC_MSG_ERROR(["libmpd development files could not be found. please install the libmpd devel package"]))
AC_PATH_X
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-01-01 20:51:40 UTC (rev 239)
@@ -43,7 +43,9 @@
#include <poll.h>
#include <pthread.h>
#include <X11/Xlib.h>
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
#include <X11/extensions/XTest.h>
+#endif
#include <X11/XF86keysym.h>
extern int debug_level;
@@ -253,14 +255,14 @@
XUngrabKeyboard(dpy,CurrentTime);
XFlush(dpy);
}
-
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
if(have_xtest) { // send the keypress elsewhere
if(event->type==KeyPress){
XTestFakeKeyEvent(dpy, keycode, True, CurrentTime);
}
XFlush(dpy);
}
-
+#endif
if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
}
@@ -617,13 +619,13 @@
printf("Cant find root window\n");
return 1;
}
-
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
have_xtest = XTestQueryExtension(dpy, &dummy, &dummy, &xtest_major_version, &xtest_minor_version);
if(have_xtest == False || xtest_major_version < 2 || (xtest_major_version <= 2 && xtest_minor_version < 2))
{
printf("XTEST extension not supported");
}
-
+#endif
/* completely ignore errors and carry on */
XSetErrorHandler(myx_error_handler);
XFlush(dpy);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|