0N/A@@ -17,6 +17,7 @@ libXp_la_SOURCES = \
0N/A+/* $XConsortium:
XpDpi.c /main/4 1996/12/04 10:24:31 lehors $ */
0N/A+/******************************************************************************
0N/A+ ******************************************************************************
0N/A+ ** (c) Copyright 1996 Hewlett-Packard Company
0N/A+ ** (c) Copyright 1996 International Business Machines Corp.
0N/A+ ** (c) Copyright 1996, Oracle
and/or its affiliates. All rights reserved.
154N/A+ ** (c) Copyright 1996 Novell, Inc.
0N/A+ ** (c) Copyright 1996 Digital Equipment Corp.
0N/A+ ** (c) Copyright 1996 Fujitsu Limited
0N/A+ ** (c) Copyright 1996 Hitachi, Ltd.
154N/A+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
159N/A+ ** of this software and associated documentation files (the "Software"), to deal
154N/A+ ** in the Software without restriction, including without limitation the rights
292N/A+ ** to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell
292N/A+ ** copies of the Software, and to permit persons to whom the Software is
159N/A+ ** furnished to do so, subject to the following conditions:
154N/A+ ** The above copyright notice and this permission notice shall be included in
605N/A+ ** all copies or substantial portions of the Software.
434N/A+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
259N/A+ ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89N/A+ ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0N/A+ ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
0N/A+ ** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0N/A+ ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
456N/A+ ** Except as contained in this notice, the names of the copyright holders shall
92N/A+ ** not be used in advertising or otherwise to promote the sale, use or other
92N/A+ ** dealings in this Software without prior written authorization from said
92N/A+ ** copyright holders.
92N/A+ ******************************************************************************
92N/A+ *****************************************************************************/
0N/A+#define X_INCLUDE_PWD_H
92N/A+#define XOS_USE_XLIB_LOCKING
345N/A+ xPrintClientDpiReq *req;
0N/A+ xPrintClientDpiReply rep;
0N/A+ XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy);
92N/A+ short dpi = (short)client_dpi;
92N/A+ XPContext context;
345N/A+ if (XpCheckExtInit(dpy, XP_SECOND_RELEASE) == -1)
92N/A+ return (False); /* NoSuchExtension */
92N/A+ LockDisplay (dpy);
92N/A+ GetReq(PrintClientDpi,req);
345N/A+ req->reqType = info->codes->major_opcode;
92N/A+ req->printReqType = X_PrintClientDpi;
439N/A+ req->clientDPI = (CARD16) dpi;
92N/A+ if (! _XReply (dpy, (xReply *) &rep, 0, xTrue)) {
92N/A+ UnlockDisplay(dpy);
92N/A+ * Bug 4402782: Add Sun specific propietary call until
X.Org takes the
92N/A+ return XpClientDPI(dpy, client_dpi);