interactive.c revision 919
214N/A * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 967N/A * Use is subject to license terms. 214N/A * Permission is hereby granted, free of charge, to any person obtaining a 919N/A * copy of this software and associated documentation files (the "Software"), 919N/A * to deal in the Software without restriction, including without limitation 919N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 919N/A * and/or sell copies of the Software, and to permit persons to whom the 919N/A * Software is furnished to do so, subject to the following conditions: 919N/A * The above copyright notice and this permission notice (including the next 919N/A * paragraph) shall be included in all copies or substantial portions of the 919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 919N/A * DEALINGS IN THE SOFTWARE. 214N/A/************************************************************ 493N/A Basic boilerplate extension. 970N/A This file also contains the code to make the priocntl on behalf 214N/A Note that ChangePriority also sets the last client with focus 493N/A to the normal priority. 214N/A If there are knobs to be added to the system, for say the nice 493N/A values for the IA class, they would be added here. 967N/A********************************************************/ 493N/A/* THIS IS NOT AN X CONSORTIUM STANDARD */ /* static int LocalConnection(OsCommPtr); */ /* Set via xorg.conf option in loadable module */ /* InitExtensions is called before InitClientPrivates(serverClient) so we set this timer to callback as soon as we hit WaitForSomething to initialize the serverClient */ "SolarisIA: Finished initializing (generation %ld)\n",
/* Allocate client private structure for this client */ /* Called when we first hit WaitForSomething to initialize serverClient */ /* Called when new client connects or existing client disconnects */ "SolarisIA: WindowManager closed (pid %d)\n",
The SProc* functions are here for completeness. They should never get called. But since they do the server has to eat the request and return thanks for sharing. * Loop through pids associated with client. Magically make last focus * group go non-interactive -IA_BOOST. /* Shortcut. Focus changed between two windows with same pid */ /* Remove priority boost for last focus group */ /* If no pid info for current client, then we're done here. * This can happen if we have a remote client with focus or if the client * is statically linked or if it is using a down rev version of libX11. /* Set the priority boost if it isn't already active */ /* Make sure server or wmgr isn't unset by testing for them, so * that LastPids is never set to point to the server or wmgr pid. /* Get TS class information */ /* Get IA class information */ Error(
"Error in setting egid to 0");
Error(
"Error in resetting egid");
return ~
Success;
/* Scary time; punt */ /* If process is in TS or IA class we can safely set parameters */ /* If this returns true, the process is already in the */ /* IA class, so we don't need to update it. */ default:
cmdmsg =
"UNKNOWN_CMD!!!";
break;
Error(
"Error in resetting egid");
/***************************************************************************** /* In Xsun we used the osPrivate in OsCommPtr, so this was SetOsPrivate. */ Check to see that all in current (a) are in last (b). And that a and b have the same number of members in the set. return 0;
/* definately NOT the same set */ /***************************************************************************** * Wrappers for normal procs - in Xsun we modified the original procs directly * in dix, but here we wrap them for a small performance loss but a large * increase in maintainability and ease of porting to new releases. /* If the input focus is PointerRootWin, send the event to where the pointer is if possible, then perhaps propogate up to root. */ "SolarisIA: WindowManager detected (pid %d)\n",