Remove the remainder of grab deactivation and closedown.

This commit is contained in:
Adam Jackson 2008-08-18 17:46:42 -04:00
parent cd1e8f2614
commit 5e43cd2869
7 changed files with 0 additions and 77 deletions

View File

@ -746,8 +746,6 @@ typedef enum {
FLAG_PC98,
FLAG_NOPM,
FLAG_XINERAMA,
FLAG_ALLOW_DEACTIVATE_GRABS,
FLAG_ALLOW_CLOSEDOWN_GRABS,
FLAG_LOG,
FLAG_RENDER_COLORMAP_MODE,
FLAG_HANDLE_SPECIAL_KEYS,
@ -801,10 +799,6 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_ALLOW_DEACTIVATE_GRABS,"AllowDeactivateGrabs", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_ALLOW_CLOSEDOWN_GRABS, "AllowClosedownGrabs", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_LOG, "Log", OPTV_STRING,
{0}, FALSE },
{ FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING,
@ -884,10 +878,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_DEACTIVATE_GRABS,
&(xf86Info.grabInfo.allowDeactivate));
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_CLOSEDOWN_GRABS,
&(xf86Info.grabInfo.allowClosedown));
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
if (xf86Info.ignoreABI) {
xf86Msg(X_CONFIG, "Ignoring ABI Version\n");

View File

@ -204,15 +204,6 @@ ProcessInputEvents ()
xf86SetViewport(xf86Info.currentScreen, x, y);
}
void
xf86GrabServerCallback(CallbackListPtr *callbacks, pointer data, pointer args)
{
ServerGrabInfoRec *grab = (ServerGrabInfoRec*)args;
xf86Info.grabInfo.server.client = grab->client;
xf86Info.grabInfo.server.grabstate = grab->grabstate;
}
/*
* Handle keyboard events that cause some kind of "action"
* (i.e., server termination, video mode changes, VT switches, etc.)
@ -240,43 +231,6 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
if (!xf86Info.dontZoom)
xf86ZoomViewport(xf86Info.currentScreen, -1);
break;
case ACTION_DISABLEGRAB:
if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowDeactivate) {
if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL &&
inputInfo.pointer->deviceGrab.DeactivateGrab)
inputInfo.pointer->deviceGrab.DeactivateGrab(inputInfo.pointer);
if (inputInfo.keyboard &&
inputInfo.keyboard->deviceGrab.grab != NULL &&
inputInfo.keyboard->deviceGrab.DeactivateGrab)
inputInfo.keyboard->deviceGrab.DeactivateGrab(inputInfo.keyboard);
}
break;
case ACTION_CLOSECLIENT:
if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowClosedown) {
ClientPtr pointer, keyboard, server;
pointer = keyboard = server = NULL;
if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL)
pointer = clients[CLIENT_ID(inputInfo.pointer->deviceGrab.grab->resource)];
if (inputInfo.keyboard && inputInfo.keyboard->deviceGrab.grab != NULL)
{
keyboard = clients[CLIENT_ID(inputInfo.keyboard->deviceGrab.grab->resource)];
if (keyboard == pointer)
keyboard = NULL;
}
if ((xf86Info.grabInfo.server.grabstate == SERVER_GRABBED) &&
(((server = xf86Info.grabInfo.server.client) == pointer) ||
(server == keyboard)))
server = NULL;
if (pointer)
CloseDownClient(pointer);
if (keyboard)
CloseDownClient(keyboard);
if (server)
CloseDownClient(server);
}
break;
#if !defined(__SOL8__) && \
(!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE)
case ACTION_SWITCHSCREEN:

View File

@ -1050,8 +1050,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* set up the proper access funcs */
xf86PostPreInit();
AddCallback(&ServerGrabCallback, xf86GrabServerCallback, NULL);
} else {
/*
* serverGeneration != 1; some OSs have to do things here, too.

View File

@ -164,7 +164,6 @@ void xf86SigHandler(int signo);
void xf86HandlePMEvents(int fd, pointer data);
extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num);
extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event);
void xf86GrabServerCallback(CallbackListPtr *, pointer, pointer);
/* xf86Helper.c */
void xf86LogInit(void);

View File

@ -115,18 +115,6 @@ typedef struct {
Bool useDefaultFontPath;
MessageType useDefaultFontPathFrom;
Bool ignoreABI;
struct {
Bool disabled; /* enable/disable deactivating
* grabs or closing the
* connection to the grabbing
* client */
ClientPtr override; /* client that disabled
* grab deactivation.
*/
Bool allowDeactivate;
Bool allowClosedown;
ServerGrabInfoRec server;
} grabInfo;
Bool allowEmptyInput; /* Allow the server to start with no input
* devices. */

View File

@ -1110,8 +1110,6 @@ typedef enum {
ACTION_TERMINATE = 0, /* Terminate Server */
ACTION_NEXT_MODE = 10, /* Switch to next video mode */
ACTION_PREV_MODE,
ACTION_DISABLEGRAB = 20, /* Cancel server/pointer/kbd grabs */
ACTION_CLOSECLIENT, /* Kill client holding grab */
ACTION_SWITCHSCREEN = 100, /* VT switch */
ACTION_SWITCHSCREEN_NEXT,
ACTION_SWITCHSCREEN_PREV,

View File

@ -30,10 +30,6 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
else if (strcasecmp(msgbuf, "+vmode")==0)
xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
else if (strcasecmp(msgbuf, "ungrab")==0)
xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
else if (strcasecmp(msgbuf, "clsgrb")==0)
xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
}
return 0;