2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, 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 Thomas Roell not be used in
|
|
|
|
* advertising or publicity pertaining to distribution of the software without
|
|
|
|
* specific, written prior permission. Thomas Roell makes no representations
|
|
|
|
* about the suitability of this software for any purpose. It is provided
|
|
|
|
* "as is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
|
|
* EVENT SHALL THOMAS ROELL 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.
|
|
|
|
*
|
|
|
|
*/
|
2003-11-25 20:29:01 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1994-2003 by The XFree86 Project, Inc.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
* Except as contained in this notice, the name of the copyright holder(s)
|
|
|
|
* and author(s) shall not be used in advertising or otherwise to promote
|
|
|
|
* the sale, use or other dealings in this Software without prior written
|
|
|
|
* authorization from the copyright holder(s) and author(s).
|
|
|
|
*/
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
|
|
|
|
|
2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_XORG_CONFIG_H
|
|
|
|
#include <xorg-config.h>
|
|
|
|
#endif
|
|
|
|
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xpoll.h>
|
|
|
|
#include <X11/Xproto.h>
|
2005-07-03 10:53:54 +02:00
|
|
|
#include "misc.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
#include "compiler.h"
|
2003-11-14 17:49:22 +01:00
|
|
|
#include "xf86.h"
|
|
|
|
#include "xf86Priv.h"
|
|
|
|
#define XF86_OS_PRIVS
|
2003-11-14 16:54:54 +01:00
|
|
|
#include "xf86_OSlib.h"
|
2008-07-24 22:03:58 +02:00
|
|
|
#include <X11/keysym.h>
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
#ifdef XFreeXDGA
|
2003-11-14 17:49:22 +01:00
|
|
|
#include "dgaproc.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
#endif
|
|
|
|
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/extensions/XI.h>
|
|
|
|
#include <X11/extensions/XIproto.h>
|
2003-11-14 17:49:22 +01:00
|
|
|
#include "inputstr.h"
|
|
|
|
#include "xf86Xinput.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
#include "mi.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
#include "mipointer.h"
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
#ifdef XF86BIGFONT
|
|
|
|
#define _XF86BIGFONT_SERVER_
|
2005-04-21 02:31:31 +02:00
|
|
|
#include <X11/extensions/xf86bigfont.h>
|
2003-11-14 16:54:54 +01:00
|
|
|
#endif
|
|
|
|
|
2004-07-30 22:56:53 +02:00
|
|
|
#ifdef DPMSExtension
|
|
|
|
#define DPMS_SERVER
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/extensions/dpms.h>
|
2004-07-30 22:56:53 +02:00
|
|
|
#include "dpmsproc.h"
|
|
|
|
#endif
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* The first of many hacks to get VT switching to work under
|
2003-11-14 16:54:54 +01:00
|
|
|
* Solaris 2.1 for x86. The basic problem is that Solaris is supposed
|
|
|
|
* to be SVR4. It is for the most part, except where the video interface
|
|
|
|
* is concerned. These hacks work around those problems.
|
2003-11-14 17:49:22 +01:00
|
|
|
* See the comments for Linux, and SCO.
|
2003-11-14 16:54:54 +01:00
|
|
|
*
|
2003-11-14 17:49:22 +01:00
|
|
|
* This is a toggling variable:
|
2003-11-14 16:54:54 +01:00
|
|
|
* FALSE = No VT switching keys have been pressed last time around
|
|
|
|
* TRUE = Possible VT switch Pending
|
|
|
|
* (DWH - 12/2/93)
|
|
|
|
*
|
|
|
|
* This has been generalised to work with Linux and *BSD+syscons (DHD)
|
|
|
|
*/
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for
|
2003-11-14 17:49:22 +01:00
|
|
|
*BSD and for avoiding VT
|
|
|
|
switches when using the DRI
|
|
|
|
automatic full screen mode.*/
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
extern fd_set EnabledDevices;
|
|
|
|
|
2005-07-03 11:39:54 +02:00
|
|
|
#ifdef XF86PM
|
2003-11-14 17:49:22 +01:00
|
|
|
extern void (*xf86OSPMClose)(void);
|
2005-07-03 11:39:54 +02:00
|
|
|
#endif
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
static void xf86VTSwitch(void);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* Allow arbitrary drivers or other XFree86 code to register with our main
|
|
|
|
* Wakeup handler.
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
2003-11-14 17:49:22 +01:00
|
|
|
typedef struct x_IHRec {
|
|
|
|
int fd;
|
|
|
|
InputHandlerProc ihproc;
|
|
|
|
pointer data;
|
|
|
|
Bool enabled;
|
|
|
|
struct x_IHRec * next;
|
|
|
|
} IHRec, *IHPtr;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
static IHPtr InputHandlers = NULL;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2006-09-28 23:34:23 +02:00
|
|
|
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
2006-07-21 22:33:28 +02:00
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
* TimeSinceLastInputEvent --
|
2003-11-14 17:49:22 +01:00
|
|
|
* Function used for screensaver purposes by the os module. Returns the
|
2003-11-14 16:54:54 +01:00
|
|
|
* time in milliseconds since there last was any input.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
int
|
2003-11-14 16:54:54 +01:00
|
|
|
TimeSinceLastInputEvent()
|
|
|
|
{
|
|
|
|
if (xf86Info.lastEventTime == 0) {
|
|
|
|
xf86Info.lastEventTime = GetTimeInMillis();
|
|
|
|
}
|
|
|
|
return GetTimeInMillis() - xf86Info.lastEventTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SetTimeSinceLastInputEvent --
|
|
|
|
* Set the lastEventTime to now.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 16:54:54 +01:00
|
|
|
SetTimeSinceLastInputEvent()
|
|
|
|
{
|
|
|
|
xf86Info.lastEventTime = GetTimeInMillis();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ProcessInputEvents --
|
|
|
|
* Retrieve all waiting input events and pass them to DIX in their
|
|
|
|
* correct chronological order. Only reads from the system pointer
|
|
|
|
* and keyboard.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 16:54:54 +01:00
|
|
|
ProcessInputEvents ()
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
mieqProcessInputEvents();
|
|
|
|
|
2007-04-12 03:46:19 +02:00
|
|
|
/* FIXME: This is a problem if we have multiple pointers */
|
|
|
|
miPointerGetPosition(inputInfo.pointer, &x, &y);
|
|
|
|
xf86SetViewport(xf86Info.currentScreen, x, y);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
/*
|
|
|
|
* Handle keyboard events that cause some kind of "action"
|
|
|
|
* (i.e., server termination, video mode changes, VT switches, etc.)
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86ProcessActionEvent(ActionEvent action, void *arg)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
ErrorF("ProcessActionEvent(%d,%x)\n", (int) action, arg);
|
|
|
|
#endif
|
|
|
|
switch (action) {
|
|
|
|
case ACTION_TERMINATE:
|
|
|
|
if (!xf86Info.dontZap) {
|
|
|
|
#ifdef XFreeXDGA
|
|
|
|
DGAShutdown();
|
|
|
|
#endif
|
|
|
|
GiveUp(0);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ACTION_NEXT_MODE:
|
|
|
|
if (!xf86Info.dontZoom)
|
|
|
|
xf86ZoomViewport(xf86Info.currentScreen, 1);
|
|
|
|
break;
|
|
|
|
case ACTION_PREV_MODE:
|
|
|
|
if (!xf86Info.dontZoom)
|
|
|
|
xf86ZoomViewport(xf86Info.currentScreen, -1);
|
|
|
|
break;
|
2008-07-23 19:25:37 +02:00
|
|
|
#if !defined(__SOL8__) && \
|
2007-10-15 03:07:03 +02:00
|
|
|
(!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE)
|
2003-11-14 17:49:22 +01:00
|
|
|
case ACTION_SWITCHSCREEN:
|
|
|
|
if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
|
|
|
|
int vtno = *((int *) arg);
|
2005-11-08 07:33:30 +01:00
|
|
|
#if defined(__SCO__) || defined(__UNIXWARE__)
|
2003-11-25 20:29:01 +01:00
|
|
|
vtno--;
|
|
|
|
#endif
|
2003-11-14 17:49:22 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0)
|
|
|
|
ErrorF("Failed to switch consoles (%s)\n", strerror(errno));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ACTION_SWITCHSCREEN_NEXT:
|
|
|
|
if (VTSwitchEnabled && !xf86Info.dontVTSwitch) {
|
2005-11-08 07:33:30 +01:00
|
|
|
/* Shouldn't this be true for (sun) && (i386) && (SVR4) ? */
|
|
|
|
#if defined(__SCO__) || defined(__UNIXWARE__)
|
2003-11-25 20:29:01 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
|
|
|
|
#else
|
2003-11-14 17:49:22 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0)
|
2003-11-25 20:29:01 +01:00
|
|
|
#endif
|
2007-10-15 03:07:03 +02:00
|
|
|
#if defined (__SCO__) || (defined(sun) && defined (__i386__) && defined (SVR4)) || defined(__UNIXWARE__)
|
2003-11-14 17:49:22 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0)
|
|
|
|
#else
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0)
|
|
|
|
#endif
|
|
|
|
ErrorF("Failed to switch consoles (%s)\n", strerror(errno));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ACTION_SWITCHSCREEN_PREV:
|
2003-11-25 20:29:01 +01:00
|
|
|
if (VTSwitchEnabled && !xf86Info.dontVTSwitch && xf86Info.vtno > 0) {
|
2003-11-14 17:49:22 +01:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno - 1) < 0)
|
|
|
|
ErrorF("Failed to switch consoles (%s)\n", strerror(errno));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
/*
|
|
|
|
* xf86Wakeup --
|
|
|
|
* Os wakeup handler.
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
/* ARGSUSED */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86Wakeup(pointer blockData, int err, pointer pReadmask)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2003-11-14 17:49:22 +01:00
|
|
|
fd_set* LastSelectMask = (fd_set*)pReadmask;
|
|
|
|
fd_set devicesWithInput;
|
|
|
|
InputInfoPtr pInfo;
|
|
|
|
|
|
|
|
if (err >= 0) {
|
|
|
|
|
|
|
|
XFD_ANDSET(&devicesWithInput, LastSelectMask, &EnabledDevices);
|
|
|
|
if (XFD_ANYSET(&devicesWithInput)) {
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
|
|
|
if (pInfo->read_input && pInfo->fd >= 0 &&
|
2003-11-25 20:29:01 +01:00
|
|
|
(FD_ISSET(pInfo->fd, &devicesWithInput) != 0)) {
|
2003-11-14 17:49:22 +01:00
|
|
|
int sigstate = xf86BlockSIGIO();
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo->read_input(pInfo);
|
2006-11-08 14:36:47 +01:00
|
|
|
xf86UnblockSIGIO(sigstate);
|
2003-11-14 17:49:22 +01:00
|
|
|
/*
|
2003-11-25 20:29:01 +01:00
|
|
|
* Remove the descriptior from the set because more than one
|
|
|
|
* device may share the same file descriptor.
|
2003-11-14 17:49:22 +01:00
|
|
|
*/
|
2003-11-25 20:29:01 +01:00
|
|
|
FD_CLR(pInfo->fd, &devicesWithInput);
|
2003-11-14 17:49:22 +01:00
|
|
|
}
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
if (err >= 0) { /* we don't want the handlers called if select() */
|
|
|
|
IHPtr ih; /* returned with an error condition, do we? */
|
|
|
|
|
|
|
|
for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
if (ih->enabled && ih->fd >= 0 && ih->ihproc &&
|
|
|
|
(FD_ISSET(ih->fd, ((fd_set *)pReadmask)) != 0)) {
|
|
|
|
ih->ihproc(ih->fd, ih->data);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
if (xf86VTSwitchPending()) xf86VTSwitch();
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* xf86SigioReadInput --
|
|
|
|
* signal handler for the SIGIO signal.
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
2003-11-14 17:49:22 +01:00
|
|
|
static void
|
|
|
|
xf86SigioReadInput(int fd,
|
|
|
|
void *closure)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2007-11-01 20:05:43 +01:00
|
|
|
int errno_save = errno;
|
2003-11-14 17:49:22 +01:00
|
|
|
int sigstate = xf86BlockSIGIO();
|
|
|
|
InputInfoPtr pInfo = (InputInfoPtr) closure;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo->read_input(pInfo);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86UnblockSIGIO(sigstate);
|
2007-11-01 20:05:43 +01:00
|
|
|
errno = errno_save;
|
2003-11-14 17:49:22 +01:00
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* xf86AddEnabledDevice --
|
2006-11-08 14:36:47 +01:00
|
|
|
*
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86AddEnabledDevice(InputInfoPtr pInfo)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2003-11-14 17:49:22 +01:00
|
|
|
if (!xf86InstallSIGIOHandler (pInfo->fd, xf86SigioReadInput, pInfo)) {
|
|
|
|
AddEnabledDevice(pInfo->fd);
|
|
|
|
}
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
/*
|
|
|
|
* xf86RemoveEnabledDevice --
|
2006-11-08 14:36:47 +01:00
|
|
|
*
|
2003-11-14 17:49:22 +01:00
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86RemoveEnabledDevice(InputInfoPtr pInfo)
|
|
|
|
{
|
|
|
|
if (!xf86RemoveSIGIOHandler (pInfo->fd)) {
|
|
|
|
RemoveEnabledDevice(pInfo->fd);
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
static int *xf86SignalIntercept = NULL;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86InterceptSignals(int *signo)
|
|
|
|
{
|
|
|
|
if ((xf86SignalIntercept = signo))
|
|
|
|
*signo = -1;
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2004-10-29 04:06:17 +02:00
|
|
|
static void (*xf86SigIllHandler)(void) = NULL;
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2004-10-29 04:06:17 +02:00
|
|
|
xf86InterceptSigIll(void (*sigillhandler)(void))
|
|
|
|
{
|
|
|
|
xf86SigIllHandler = sigillhandler;
|
|
|
|
}
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
* xf86SigHandler --
|
2003-11-14 17:49:22 +01:00
|
|
|
* Catch unexpected signals and exit or continue cleanly.
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86SigHandler(int signo)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2004-10-29 04:06:17 +02:00
|
|
|
if ((signo == SIGILL) && xf86SigIllHandler) {
|
|
|
|
(*xf86SigIllHandler)();
|
|
|
|
/* Re-arm handler just in case we unexpectedly return here */
|
|
|
|
(void) signal(signo, xf86SigHandler);
|
|
|
|
return;
|
|
|
|
}
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) {
|
2005-03-05 21:47:12 +01:00
|
|
|
*xf86SignalIntercept = signo;
|
2003-11-14 17:49:22 +01:00
|
|
|
/* Re-arm handler just in case */
|
|
|
|
(void) signal(signo, xf86SigHandler);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
signal(signo,SIG_IGN);
|
|
|
|
xf86Info.caughtSignal = TRUE;
|
2003-11-14 17:49:22 +01:00
|
|
|
#ifdef XF86BIGFONT
|
|
|
|
XF86BigfontCleanup();
|
|
|
|
#endif
|
2005-07-02 20:06:05 +02:00
|
|
|
|
|
|
|
xorg_backtrace();
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
FatalError("Caught signal %d. Server aborting\n", signo);
|
|
|
|
}
|
|
|
|
|
2008-08-06 19:37:32 +02:00
|
|
|
/*
|
|
|
|
* xf86PrintBacktrace --
|
|
|
|
* Print a stack backtrace for debugging purposes.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-08-06 19:37:32 +02:00
|
|
|
xf86PrintBacktrace(void)
|
|
|
|
{
|
|
|
|
xorg_backtrace();
|
|
|
|
}
|
|
|
|
|
2008-07-24 22:03:58 +02:00
|
|
|
#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
|
|
|
|
#define ModifierDown(k) ((keyc->state & (k)) == (k))
|
|
|
|
|
2006-07-21 21:23:37 +02:00
|
|
|
static void
|
|
|
|
xf86ReleaseKeys(DeviceIntPtr pDev)
|
|
|
|
{
|
|
|
|
KeyClassPtr keyc = NULL;
|
|
|
|
KeySym *map = NULL;
|
2006-10-08 19:34:32 +02:00
|
|
|
xEvent ke;
|
2006-07-21 21:23:37 +02:00
|
|
|
int i = 0, j = 0, nevents = 0;
|
|
|
|
|
|
|
|
if (!pDev || !pDev->key)
|
|
|
|
return;
|
|
|
|
|
|
|
|
keyc = pDev->key;
|
|
|
|
map = keyc->curKeySyms.map;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Hmm... here is the biggest hack of every time !
|
|
|
|
* It may be possible that a switch-vt procedure has finished BEFORE
|
|
|
|
* you released all keys neccessary to do this. That peculiar behavior
|
|
|
|
* can fool the X-server pretty much, cause it assumes that some keys
|
|
|
|
* were not released. TWM may stuck alsmost completly....
|
|
|
|
* OK, what we are doing here is after returning from the vt-switch
|
|
|
|
* exeplicitely unrelease all keyboard keys before the input-devices
|
|
|
|
* are reenabled.
|
|
|
|
*/
|
|
|
|
|
|
|
|
for (i = keyc->curKeySyms.minKeyCode, map = keyc->curKeySyms.map;
|
|
|
|
i < keyc->curKeySyms.maxKeyCode;
|
|
|
|
i++, map += keyc->curKeySyms.mapWidth) {
|
|
|
|
if (KeyPressed(i)) {
|
|
|
|
switch (*map) {
|
|
|
|
/* Don't release the lock keys */
|
|
|
|
case XK_Caps_Lock:
|
|
|
|
case XK_Shift_Lock:
|
|
|
|
case XK_Num_Lock:
|
|
|
|
case XK_Scroll_Lock:
|
|
|
|
case XK_Kana_Lock:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (pDev == inputInfo.keyboard) {
|
|
|
|
ke.u.keyButtonPointer.time = GetTimeInMillis();
|
|
|
|
ke.u.keyButtonPointer.rootX = 0;
|
|
|
|
ke.u.keyButtonPointer.rootY = 0;
|
|
|
|
ke.u.u.type = KeyRelease;
|
|
|
|
ke.u.u.detail = i;
|
|
|
|
(*pDev->public.processInputProc) (&ke, pDev, 1);
|
|
|
|
}
|
|
|
|
else {
|
2007-09-05 23:19:19 +02:00
|
|
|
int sigstate = xf86BlockSIGIO ();
|
2006-10-08 19:34:32 +02:00
|
|
|
nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i);
|
2006-07-21 21:23:37 +02:00
|
|
|
for (j = 0; j < nevents; j++)
|
2008-04-23 08:46:15 +02:00
|
|
|
mieqEnqueue(pDev, (xf86Events + j)->event);
|
2007-09-05 23:19:19 +02:00
|
|
|
xf86UnblockSIGIO(sigstate);
|
2006-07-21 21:23:37 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
* xf86VTSwitch --
|
|
|
|
* Handle requests for switching the vt.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
xf86VTSwitch()
|
|
|
|
{
|
2003-11-14 17:49:22 +01:00
|
|
|
int i, prevSIGIO;
|
|
|
|
InputInfoPtr pInfo;
|
|
|
|
IHPtr ih;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
#ifdef DEBUG
|
|
|
|
ErrorF("xf86VTSwitch()\n");
|
|
|
|
#endif
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
#ifdef XFreeXDGA
|
2003-11-14 17:49:22 +01:00
|
|
|
if(!DGAVTSwitch())
|
|
|
|
return;
|
|
|
|
#endif
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* Since all screens are currently all in the same state it is sufficient
|
|
|
|
* check the first. This might change in future.
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
2003-11-14 17:49:22 +01:00
|
|
|
if (xf86Screens[0]->vtSema) {
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
ErrorF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
|
|
|
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
2004-10-11 11:58:04 +02:00
|
|
|
#endif
|
|
|
|
#ifdef DPMSExtension
|
|
|
|
if (DPMSPowerLevel != DPMSModeOn)
|
2007-08-16 16:36:05 +02:00
|
|
|
DPMSSet(serverClient, DPMSModeOn);
|
2003-11-14 16:54:54 +01:00
|
|
|
#endif
|
2003-11-14 17:49:22 +01:00
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
if (!(dispatchException & DE_TERMINATE))
|
|
|
|
if (xf86Screens[i]->EnableDisableFBAccess)
|
|
|
|
(*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE);
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2006-11-08 14:36:47 +01:00
|
|
|
/*
|
2003-11-14 17:49:22 +01:00
|
|
|
* Keep the order: Disable Device > LeaveVT
|
2006-11-08 14:36:47 +01:00
|
|
|
* EnterVT > EnableDevice
|
2003-11-14 17:49:22 +01:00
|
|
|
*/
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
2006-11-02 03:12:55 +01:00
|
|
|
if (pInfo->dev)
|
|
|
|
DisableDevice(pInfo->dev);
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
|
|
|
xf86EnterServerState(SETUP);
|
2004-10-11 11:58:04 +02:00
|
|
|
for (i = 0; i < xf86NumScreens; i++)
|
2004-07-30 22:56:53 +02:00
|
|
|
xf86Screens[i]->LeaveVT(i, 0);
|
2004-10-11 11:58:04 +02:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
xf86DisableInputHandler(ih);
|
|
|
|
xf86AccessLeave(); /* We need this here, otherwise */
|
|
|
|
xf86AccessLeaveState(); /* console won't be restored */
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
if (!xf86VTSwitchAway()) {
|
|
|
|
/*
|
2006-11-08 14:36:47 +01:00
|
|
|
* switch failed
|
2003-11-14 16:54:54 +01:00
|
|
|
*/
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
#ifdef DEBUG
|
|
|
|
ErrorF("xf86VTSwitch: Leave failed\n");
|
2003-11-14 16:54:54 +01:00
|
|
|
#endif
|
2003-11-14 17:49:22 +01:00
|
|
|
prevSIGIO = xf86BlockSIGIO();
|
|
|
|
xf86AccessEnter();
|
|
|
|
xf86EnterServerState(SETUP);
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
if (!xf86Screens[i]->EnterVT(i, 0))
|
|
|
|
FatalError("EnterVT failed for screen %d\n", i);
|
|
|
|
}
|
|
|
|
xf86EnterServerState(OPERATING);
|
|
|
|
if (!(dispatchException & DE_TERMINATE)) {
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
if (xf86Screens[i]->EnableDisableFBAccess)
|
|
|
|
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
|
|
|
|
}
|
|
|
|
}
|
2007-11-19 22:55:09 +01:00
|
|
|
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
2006-11-02 03:12:55 +01:00
|
|
|
if (pInfo->dev) {
|
|
|
|
xf86ReleaseKeys(pInfo->dev);
|
|
|
|
EnableDevice(pInfo->dev);
|
|
|
|
}
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2006-07-21 21:23:37 +02:00
|
|
|
/* XXX HACK */
|
|
|
|
xf86ReleaseKeys(inputInfo.keyboard);
|
2003-11-14 17:49:22 +01:00
|
|
|
for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
xf86EnableInputHandler(ih);
|
|
|
|
|
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
} else {
|
2005-07-03 11:39:54 +02:00
|
|
|
#ifdef XF86PM
|
2003-11-14 17:49:22 +01:00
|
|
|
if (xf86OSPMClose)
|
|
|
|
xf86OSPMClose();
|
|
|
|
xf86OSPMClose = NULL;
|
2005-07-03 11:39:54 +02:00
|
|
|
#endif
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
/*
|
|
|
|
* zero all access functions to
|
|
|
|
* trap calls when switched away.
|
|
|
|
*/
|
|
|
|
xf86Screens[i]->vtSema = FALSE;
|
|
|
|
xf86Screens[i]->access = NULL;
|
|
|
|
xf86Screens[i]->busAccess = NULL;
|
|
|
|
}
|
2005-01-28 17:13:00 +01:00
|
|
|
if (xorgHWAccess)
|
|
|
|
xf86DisableIO();
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
} else {
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
ErrorF("xf86VTSwitch: Entering\n");
|
|
|
|
#endif
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!xf86VTSwitchTo()) return;
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
prevSIGIO = xf86BlockSIGIO();
|
2005-07-03 11:39:54 +02:00
|
|
|
#ifdef XF86PM
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86OSPMClose = xf86OSPMOpen();
|
2005-07-03 11:39:54 +02:00
|
|
|
#endif
|
2003-11-14 17:49:22 +01:00
|
|
|
|
2005-01-28 17:13:00 +01:00
|
|
|
if (xorgHWAccess)
|
|
|
|
xf86EnableIO();
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86AccessEnter();
|
|
|
|
xf86EnterServerState(SETUP);
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
xf86Screens[i]->vtSema = TRUE;
|
|
|
|
if (!xf86Screens[i]->EnterVT(i, 0))
|
|
|
|
FatalError("EnterVT failed for screen %d\n", i);
|
|
|
|
}
|
|
|
|
xf86EnterServerState(OPERATING);
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
if (xf86Screens[i]->EnableDisableFBAccess)
|
|
|
|
(*xf86Screens[i]->EnableDisableFBAccess)(i, TRUE);
|
|
|
|
}
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/* Turn screen saver off when switching back */
|
2007-11-19 22:55:09 +01:00
|
|
|
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
2006-11-02 03:12:55 +01:00
|
|
|
if (pInfo->dev) {
|
|
|
|
xf86ReleaseKeys(pInfo->dev);
|
|
|
|
EnableDevice(pInfo->dev);
|
|
|
|
}
|
2003-11-14 17:49:22 +01:00
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2006-07-21 21:23:37 +02:00
|
|
|
/* XXX HACK */
|
|
|
|
xf86ReleaseKeys(inputInfo.keyboard);
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
xf86EnableInputHandler(ih);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
/* Input handler registration */
|
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
static pointer
|
|
|
|
addInputHandler(int fd, InputHandlerProc proc, pointer data)
|
2003-11-14 17:49:22 +01:00
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
|
|
|
|
if (fd < 0 || !proc)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
ih = xcalloc(sizeof(*ih), 1);
|
|
|
|
if (!ih)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
ih->fd = fd;
|
|
|
|
ih->ihproc = proc;
|
|
|
|
ih->data = data;
|
|
|
|
ih->enabled = TRUE;
|
|
|
|
|
|
|
|
ih->next = InputHandlers;
|
|
|
|
InputHandlers = ih;
|
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
return ih;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
pointer
|
2006-11-08 14:27:58 +01:00
|
|
|
xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data)
|
2006-11-08 14:36:47 +01:00
|
|
|
{
|
2006-11-08 14:27:58 +01:00
|
|
|
IHPtr ih = addInputHandler(fd, proc, data);
|
|
|
|
|
|
|
|
if (ih)
|
|
|
|
AddEnabledDevice(fd);
|
|
|
|
return ih;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
pointer
|
2006-11-08 14:27:58 +01:00
|
|
|
xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
|
2006-11-08 14:36:47 +01:00
|
|
|
{
|
2006-11-08 14:27:58 +01:00
|
|
|
IHPtr ih = addInputHandler(fd, proc, data);
|
2003-11-14 17:49:22 +01:00
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
if (ih)
|
|
|
|
AddGeneralSocket(fd);
|
2003-11-14 17:49:22 +01:00
|
|
|
return ih;
|
|
|
|
}
|
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
static void
|
|
|
|
removeInputHandler(IHPtr ih)
|
|
|
|
{
|
|
|
|
IHPtr p;
|
|
|
|
|
|
|
|
if (ih == InputHandlers)
|
|
|
|
InputHandlers = ih->next;
|
|
|
|
else {
|
|
|
|
p = InputHandlers;
|
|
|
|
while (p && p->next != ih)
|
|
|
|
p = p->next;
|
|
|
|
if (ih)
|
|
|
|
p->next = ih->next;
|
|
|
|
}
|
|
|
|
xfree(ih);
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
int
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86RemoveInputHandler(pointer handler)
|
|
|
|
{
|
2006-11-08 14:27:58 +01:00
|
|
|
IHPtr ih;
|
2003-11-14 17:49:22 +01:00
|
|
|
int fd;
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
if (!handler)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
fd = ih->fd;
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
if (ih->fd >= 0)
|
|
|
|
RemoveEnabledDevice(ih->fd);
|
2006-11-08 14:27:58 +01:00
|
|
|
removeInputHandler(ih);
|
|
|
|
|
|
|
|
return fd;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
int
|
2006-11-08 14:27:58 +01:00
|
|
|
xf86RemoveGeneralHandler(pointer handler)
|
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
int fd;
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
if (!handler)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
fd = ih->fd;
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2006-11-08 14:27:58 +01:00
|
|
|
if (ih->fd >= 0)
|
|
|
|
RemoveGeneralSocket(ih->fd);
|
|
|
|
removeInputHandler(ih);
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
return fd;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-10-13 01:07:24 +02:00
|
|
|
xf86DisableInputHandler(pointer handler)
|
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
|
|
|
|
if (!handler)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
ih->enabled = FALSE;
|
|
|
|
if (ih->fd >= 0)
|
|
|
|
RemoveEnabledDevice(ih->fd);
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-10-13 01:08:26 +02:00
|
|
|
xf86DisableGeneralHandler(pointer handler)
|
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
|
|
|
|
if (!handler)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
ih->enabled = FALSE;
|
|
|
|
if (ih->fd >= 0)
|
|
|
|
RemoveGeneralSocket(ih->fd);
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-10-13 01:07:24 +02:00
|
|
|
xf86EnableInputHandler(pointer handler)
|
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
|
|
|
|
if (!handler)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
ih->enabled = TRUE;
|
|
|
|
if (ih->fd >= 0)
|
|
|
|
AddEnabledDevice(ih->fd);
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-10-13 01:08:26 +02:00
|
|
|
xf86EnableGeneralHandler(pointer handler)
|
|
|
|
{
|
|
|
|
IHPtr ih;
|
|
|
|
|
|
|
|
if (!handler)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ih = handler;
|
|
|
|
ih->enabled = TRUE;
|
|
|
|
if (ih->fd >= 0)
|
|
|
|
AddGeneralSocket(ih->fd);
|
|
|
|
}
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
/*
|
|
|
|
* As used currently by the DRI, the return value is ignored.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2003-11-14 17:49:22 +01:00
|
|
|
xf86EnableVTSwitch(Bool new)
|
|
|
|
{
|
|
|
|
static Bool def = TRUE;
|
|
|
|
Bool old;
|
|
|
|
|
|
|
|
old = VTSwitchEnabled;
|
|
|
|
if (!new) {
|
|
|
|
/* Disable VT switching */
|
|
|
|
def = VTSwitchEnabled;
|
|
|
|
VTSwitchEnabled = FALSE;
|
|
|
|
} else {
|
|
|
|
/* Restore VT switching to default */
|
|
|
|
VTSwitchEnabled = def;
|
|
|
|
}
|
|
|
|
return old;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2005-08-26 09:35:55 +02:00
|
|
|
xf86ReloadInputDevs(int sig)
|
|
|
|
{
|
|
|
|
InputInfoPtr pInfo;
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2005-08-26 09:35:55 +02:00
|
|
|
signal(sig, (void(*)(int))xf86ReloadInputDevs);
|
|
|
|
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
|
|
|
DisableDevice(pInfo->dev);
|
|
|
|
EnableDevice(pInfo->dev);
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2006-11-08 14:36:47 +01:00
|
|
|
|
2005-08-26 09:35:55 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2006-11-01 22:10:26 +01:00
|
|
|
DDXRingBell(int volume, int pitch, int duration) {
|
|
|
|
xf86OSRingBell(volume, pitch, duration);
|
|
|
|
}
|