1b4ee4795Smrg/* 2b4ee4795Smrg * Copyright © 2009 Red Hat, Inc. 3b4ee4795Smrg * 4b4ee4795Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5b4ee4795Smrg * copy of this software and associated documentation files (the "Software"), 6b4ee4795Smrg * to deal in the Software without restriction, including without limitation 7b4ee4795Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8b4ee4795Smrg * and/or sell copies of the Software, and to permit persons to whom the 9b4ee4795Smrg * Software is furnished to do so, subject to the following conditions: 10b4ee4795Smrg * 11b4ee4795Smrg * The above copyright notice and this permission notice (including the next 12b4ee4795Smrg * paragraph) shall be included in all copies or substantial portions of the 13b4ee4795Smrg * Software. 14b4ee4795Smrg * 15b4ee4795Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16b4ee4795Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17b4ee4795Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18b4ee4795Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19b4ee4795Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20b4ee4795Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21b4ee4795Smrg * DEALINGS IN THE SOFTWARE. 22b4ee4795Smrg * 23b4ee4795Smrg */ 24b4ee4795Smrg 25b4ee4795Smrg#ifdef HAVE_CONFIG_H 26b4ee4795Smrg#include <config.h> 27b4ee4795Smrg#endif 28b4ee4795Smrg#include "Xlibint.h" 29b4ee4795Smrg 30b4ee4795SmrgBool 31b4ee4795SmrgXGetEventData(Display *dpy, XGenericEventCookie *event) 32b4ee4795Smrg{ 33b4ee4795Smrg Bool rc; 34b4ee4795Smrg LockDisplay(dpy); 35b4ee4795Smrg 36b4ee4795Smrg rc = _XFetchEventCookie(dpy, event); 37b4ee4795Smrg 38b4ee4795Smrg UnlockDisplay(dpy); 39b4ee4795Smrg 40b4ee4795Smrg return rc; 41b4ee4795Smrg} 42b4ee4795Smrg 43