1 /*
2 * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
33 #include "awt_p.h"
34 #include "awt_GraphicsEnv.h"
35 #define XK_MISCELLANY
36 #include <X11/keysymdef.h>
37 #include <X11/Xutil.h>
38 #include <X11/Xmd.h>
39 #include <X11/extensions/xtestext1.h>
40 #include <X11/extensions/XTest.h>
41 #include <X11/extensions/XInput.h>
42 #include <X11/extensions/XI.h>
43 #include <jni.h>
44 #include <sizecalc.h>
45 #include "canvas.h"
46 #include "wsutils.h"
47 #include "list.h"
48 #include "multiVis.h"
49 #include "gtk_interface.h"
50
51 #include "java_awt_event_InputEvent.h"
52
53 #if defined(__linux__) || defined(MACOSX)
54 #include <sys/socket.h>
55 #endif
56
57 static Bool (*compositeQueryExtension) (Display*, int*, int*);
58 static Status (*compositeQueryVersion) (Display*, int*, int*);
59 static Window (*compositeGetOverlayWindow) (Display *, Window);
60
61 extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
62
63 static jint * masks;
64 static jint num_buttons;
65
66 static void *xCompositeHandle;
67
68 static const char* XCOMPOSITE = JNI_LIB_NAME("Xcomposite");
69 static const char* XCOMPOSITE_VERSIONED = VERSIONED_JNI_LIB_NAME("Xcomposite", "1");
70
71 static Bool checkXCompositeFunctions(void) {
72 return (compositeQueryExtension != NULL &&
73 compositeQueryVersion != NULL &&
|
1 /*
2 * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
33 #include "awt_p.h"
34 #include "awt_GraphicsEnv.h"
35 #define XK_MISCELLANY
36 #include <X11/keysymdef.h>
37 #include <X11/Xutil.h>
38 #include <X11/Xmd.h>
39 #include <X11/extensions/xtestext1.h>
40 #include <X11/extensions/XTest.h>
41 #include <X11/extensions/XInput.h>
42 #include <X11/extensions/XI.h>
43 #include <jni.h>
44 #include <sizecalc.h>
45 #include "canvas.h"
46 #include "wsutils.h"
47 #include "list.h"
48 #include "multiVis.h"
49 #include "gtk_interface.h"
50
51 #include "java_awt_event_InputEvent.h"
52
53 #if defined(__linux__)
54 #include <sys/socket.h>
55 #endif
56
57 static Bool (*compositeQueryExtension) (Display*, int*, int*);
58 static Status (*compositeQueryVersion) (Display*, int*, int*);
59 static Window (*compositeGetOverlayWindow) (Display *, Window);
60
61 extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
62
63 static jint * masks;
64 static jint num_buttons;
65
66 static void *xCompositeHandle;
67
68 static const char* XCOMPOSITE = JNI_LIB_NAME("Xcomposite");
69 static const char* XCOMPOSITE_VERSIONED = VERSIONED_JNI_LIB_NAME("Xcomposite", "1");
70
71 static Bool checkXCompositeFunctions(void) {
72 return (compositeQueryExtension != NULL &&
73 compositeQueryVersion != NULL &&
|