interactive.c revision 705
606N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 0N/A * Permission is hereby granted, free of charge, to any person obtaining a 0N/A * copy of this software and associated documentation files (the 0N/A * "Software"), to deal in the Software without restriction, including 0N/A * without limitation the rights to use, copy, modify, merge, publish, 0N/A * distribute, and/or sell copies of the Software, and to permit persons 0N/A * to whom the Software is furnished to do so, provided that the above 0N/A * copyright notice(s) and this permission notice appear in all copies of 0N/A * the Software and that both the above copyright notice(s) and this 0N/A * permission notice appear in supporting documentation. 0N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 0N/A * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 0N/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 0N/A * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 0N/A * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 0N/A * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 0N/A * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 0N/A * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 0N/A * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 0N/A * Except as contained in this notice, the name of a copyright holder 0N/A * shall not be used in advertising or otherwise to promote the sale, use 0N/A * or other dealings in this Software without prior written authorization 0N/A * of the copyright holder. 0N/A/************************************************************ 0N/A Basic boilerplate extension. 0N/A This file also contains the code to make the priocntl on behalf 0N/A Note that ChangePriority also sets the last client with focus 0N/A to the normal priority. 0N/A If there are knobs to be added to the system, for say the nice 0N/A values for the IA class, they would be added here. 0N/A********************************************************/ 0N/A/* THIS IS NOT AN X CONSORTIUM STANDARD */ 0N/A/* static int LocalConnection(OsCommPtr); */ 0N/A /* InitExtensions is called before InitClientPrivates(serverClient) 0N/A so we set this timer to callback as soon as we hit WaitForSomething 0N/A to initialize the serverClient */ 606N/A "SolarisIA: Finished initializing (generation %ld)\n",
606N/A/* Allocate client private structure for this client */ 0N/A/* Called when we first hit WaitForSomething to initialize serverClient */ 0N/A/* Called when new client connects or existing client disconnects */ 606N/A "SolarisIA: WindowManager closed (pid %d)\n",
0N/A The SProc* functions are here for completeness. They should never get 0N/A called. But since they do the server has to eat the request and 0N/A return thanks for sharing. 606N/A * Loop through pids associated with client. Magically make last focus 606N/A * group go non-interactive -IA_BOOST. 606N/A /* Shortcut. Focus changed between two windows with same pid */ 606N/A /* Remove priority boost for last focus group */ 606N/A /* If no pid info for current client, then we're done here. 606N/A * This can happen if we have a remote client with focus or if the client 606N/A * is statically linked or if it is using a down rev version of libX11. 606N/A /* Set the priority boost if it isn't already active */ 606N/A /* Make sure server or wmgr isn't unset by testing for them, so 606N/A * that LastPids is never set to point to the server or wmgr pid. 606N/A /* Get TS class information */ 606N/A /* Get IA class information */ 606N/A /* If process is in TS or IA class we can safely set parameters */ 606N/A /* If this returns true, the process is already in the */ 606N/A /* IA class, so we don't need to update it. */ 0N/A/***************************************************************************** 0N/A/* In Xsun we used the osPrivate in OsCommPtr, so this was SetOsPrivate. */ 606N/A Check to see that all in current (a) are in last (b). 606N/A And that a and b have the same number of members in the set. 606N/A return 0;
/* definately NOT the same set */ 0N/A/***************************************************************************** 0N/A * Wrappers for normal procs - in Xsun we modified the original procs directly 0N/A * in dix, but here we wrap them for a small performance loss but a large 0N/A * increase in maintainability and ease of porting to new releases. 0N/A /* If the input focus is PointerRootWin, send the event to where 0N/A the pointer is if possible, then perhaps propogate up to root. */ 606N/A "SolarisIA: WindowManager detected (pid %d)\n",