summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--hw/xfree86/dixmods/Makefile.am7
-rw-r--r--hw/xfree86/dixmods/xkbKillSrv.c55
-rw-r--r--hw/xfree86/dixmods/xkbPrivate.c42
-rw-r--r--hw/xfree86/dixmods/xkbVT.c67
-rw-r--r--xkb/ddxKillSrv.c8
-rw-r--r--xkb/ddxPrivate.c24
-rw-r--r--xkb/ddxVT.c20
8 files changed, 175 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index 83ac158e5..dd2235b82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,16 @@
* xkb/maprules.c:
Bug #3819: Remove open-coding of strcasecmp.
+ * xkb/ddxVT.c:
+ * xkb/ddxPrivate.c:
+ * xkb/ddxKillSrv.c:
+ * hw/xfree86/dixmods/Makefile.am:
+ * hw/xfree86/dixmods/xkbVT.c:
+ * hw/xfree86/dixmods/xkbPrivate.c:
+ * hw/xfree86/dixmods/xkbKillSrv.c:
+ Move XFree86 DDX actions out of xkb/ and into proper files in their
+ own right in dixmods.
+
2006-03-25 Adam Jackson <ajax@freedesktop.org>
* hw/xfree86/common/xf86Bus.c:
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 5162ee18b..7b6afc4db 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -101,13 +101,8 @@ libtype1_la_SOURCES = type1mod.c
libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
-XKB_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
-libxorgxkb_la_SOURCES = $(XKB_SOURCES)
+libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
libxtrap_la_LDFLAGS = -avoid-version
libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
libxtrap_la_SOURCES = xf86XTrapModule.c
-
-$(XKB_SOURCES):
- echo "#define XF86DDXACTIONS" > $@
- echo "#include \"$(top_srcdir)/xkb/ddx${@:xkb%=%}\"" >> $@
diff --git a/hw/xfree86/dixmods/xkbKillSrv.c b/hw/xfree86/dixmods/xkbKillSrv.c
new file mode 100644
index 000000000..ee19454b0
--- /dev/null
+++ b/hw/xfree86/dixmods/xkbKillSrv.c
@@ -0,0 +1,55 @@
+/* $Xorg: ddxKillSrv.c,v 1.3 2000/08/17 19:53:46 cpqbld Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxKillSrv.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <stdio.h>
+#define NEED_EVENTS 1
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include <X11/extensions/XKBsrv.h>
+#include <X11/extensions/XI.h>
+
+#include "xf86.h"
+
+int
+XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+{
+ xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
+ return 0;
+}
diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
new file mode 100644
index 000000000..b632ecb89
--- /dev/null
+++ b/hw/xfree86/dixmods/xkbPrivate.c
@@ -0,0 +1,42 @@
+/* $XFree86: xc/programs/Xserver/xkb/ddxPrivate.c,v 1.2 2003/04/03 16:20:22 dawes Exp $ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <stdio.h>
+#define NEED_EVENTS 1
+#include <X11/X.h>
+#include "windowstr.h"
+#define XKBSRV_NEED_FILE_FUNCS
+#include <X11/extensions/XKBsrv.h>
+
+#include "xf86.h"
+
+int
+XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+{
+ XkbAnyAction *xf86act = &(act->any);
+ char msgbuf[XkbAnyActionDataSize+1];
+
+ if (xf86act->type == XkbSA_XFree86Private) {
+ memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
+ msgbuf[XkbAnyActionDataSize]= '\0';
+ if (_XkbStrCaseCmp(msgbuf, "-vmode")==0)
+ xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
+ else if (_XkbStrCaseCmp(msgbuf, "+vmode")==0)
+ xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
+ else if (_XkbStrCaseCmp(msgbuf, "ungrab")==0)
+ xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
+ else if (_XkbStrCaseCmp(msgbuf, "clsgrb")==0)
+ xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
+ else
+ xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
+ }
+
+ return 0;
+}
diff --git a/hw/xfree86/dixmods/xkbVT.c b/hw/xfree86/dixmods/xkbVT.c
new file mode 100644
index 000000000..c637d5545
--- /dev/null
+++ b/hw/xfree86/dixmods/xkbVT.c
@@ -0,0 +1,67 @@
+/* $Xorg: ddxVT.c,v 1.3 2000/08/17 19:53:46 cpqbld Exp $ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxVT.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <stdio.h>
+#define NEED_EVENTS 1
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include <X11/extensions/XKBsrv.h>
+#include <X11/extensions/XI.h>
+
+#include "xf86.h"
+
+int
+XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+{
+ int scrnnum = XkbSAScreen(&act->screen);
+
+ if (act->screen.flags & XkbSA_SwitchApplication) {
+ if (act->screen.flags & XkbSA_SwitchAbsolute)
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN,(void *) &scrnnum);
+ else {
+ if (scrnnum < 0)
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV,NULL);
+ else
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT,NULL);
+ }
+ }
+
+ return 1;
+}
diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c
index ee0acb028..740268eb9 100644
--- a/xkb/ddxKillSrv.c
+++ b/xkb/ddxKillSrv.c
@@ -45,17 +45,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKBsrv.h>
#include <X11/extensions/XI.h>
-#ifdef XF86DDXACTIONS
-#include "xf86.h"
-#endif
-
int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{
-#ifdef XF86DDXACTIONS
- xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
-#else
GiveUp(1);
-#endif
return 0;
}
diff --git a/xkb/ddxPrivate.c b/xkb/ddxPrivate.c
index 5c0bca4cd..f4d3c5db4 100644
--- a/xkb/ddxPrivate.c
+++ b/xkb/ddxPrivate.c
@@ -15,32 +15,8 @@
#define XKBSRV_NEED_FILE_FUNCS
#include <X11/extensions/XKBsrv.h>
-#ifdef XF86DDXACTIONS
-#include "xf86.h"
-#endif
-
int
XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{
-#ifdef XF86DDXACTIONS
- XkbAnyAction *xf86act = &(act->any);
- char msgbuf[XkbAnyActionDataSize+1];
-
- if (xf86act->type == XkbSA_XFree86Private) {
- memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
- msgbuf[XkbAnyActionDataSize]= '\0';
- if (_XkbStrCaseCmp(msgbuf, "-vmode")==0)
- xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
- else if (_XkbStrCaseCmp(msgbuf, "+vmode")==0)
- xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
- else if (_XkbStrCaseCmp(msgbuf, "ungrab")==0)
- xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
- else if (_XkbStrCaseCmp(msgbuf, "clsgrb")==0)
- xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
- else
- xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
- }
-#endif
return 0;
}
-
diff --git a/xkb/ddxVT.c b/xkb/ddxVT.c
index 1b7853fa0..922b2c65f 100644
--- a/xkb/ddxVT.c
+++ b/xkb/ddxVT.c
@@ -45,28 +45,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKBsrv.h>
#include <X11/extensions/XI.h>
-#ifdef XF86DDXACTIONS
-#include "xf86.h"
-#endif
-
int
XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{
-#ifdef XF86DDXACTIONS
- {
- int scrnnum = XkbSAScreen(&act->screen);
-
- if (act->screen.flags & XkbSA_SwitchApplication) {
- if (act->screen.flags & XkbSA_SwitchAbsolute)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN,(void *) &scrnnum);
- else {
- if (scrnnum < 0)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV,NULL);
- else
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT,NULL);
- }
- }
- }
-#endif
return 1;
}