SetIFocus.c revision 1ab64890
11.1Skamil/* $Xorg: SetIFocus.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */
21.1Skamil/*
31.1Skamil
41.1SkamilCopyright 1986, 1998  The Open Group
51.1Skamil
61.1SkamilPermission to use, copy, modify, distribute, and sell this software and its
71.1Skamildocumentation for any purpose is hereby granted without fee, provided that
81.1Skamilthe above copyright notice appear in all copies and that both that
91.1Skamilcopyright notice and this permission notice appear in supporting
101.1Skamildocumentation.
111.1Skamil
121.1SkamilThe above copyright notice and this permission notice shall be included in
131.1Skamilall copies or substantial portions of the Software.
141.1Skamil
151.1SkamilTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
161.1SkamilIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
171.1SkamilFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
181.1SkamilOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
191.1SkamilAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
201.1SkamilCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
211.1Skamil
221.1SkamilExcept as contained in this notice, the name of The Open Group shall not be
231.1Skamilused in advertising or otherwise to promote the sale, use or other dealings
241.1Skamilin this Software without prior written authorization from The Open Group.
251.1Skamil
261.1Skamil*/
271.1Skamil/* $XFree86: xc/lib/X11/SetIFocus.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */
281.1Skamil
291.1Skamil#ifdef HAVE_CONFIG_H
301.1Skamil#include <config.h>
311.1Skamil#endif
321.1Skamil#include "Xlibint.h"
331.1Skamil
341.1Skamilint
351.1SkamilXSetInputFocus(
361.1Skamil    register Display *dpy,
371.1Skamil    Window focus,
381.1Skamil    int revert_to,
391.1Skamil    Time time)
401.1Skamil{
411.1Skamil    register xSetInputFocusReq *req;
421.1Skamil
431.1Skamil    LockDisplay(dpy);
441.1Skamil    GetReq(SetInputFocus, req);
451.1Skamil    req->focus = focus;
461.1Skamil    req->revertTo = revert_to;
471.1Skamil    req->time = time;
481.1Skamil    UnlockDisplay(dpy);
491.1Skamil    SyncHandle();
501.1Skamil    return 1;
511.1Skamil}
521.1Skamil
531.1Skamil