summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/detect_prime.cpp2
-rw-r--r--platform/x11/export/export.h5
-rw-r--r--platform/x11/joypad_linux.cpp5
-rw-r--r--platform/x11/os_x11.cpp6
4 files changed, 14 insertions, 4 deletions
diff --git a/platform/x11/detect_prime.cpp b/platform/x11/detect_prime.cpp
index a0e5f835c0..d79fd00118 100644
--- a/platform/x11/detect_prime.cpp
+++ b/platform/x11/detect_prime.cpp
@@ -31,6 +31,8 @@
#ifdef X11_ENABLED
#if defined(OPENGL_ENABLED)
+#include "detect_prime.h"
+
#include "core/print_string.h"
#include "core/ustring.h"
diff --git a/platform/x11/export/export.h b/platform/x11/export/export.h
index d94ea114a8..4049e6a8bf 100644
--- a/platform/x11/export/export.h
+++ b/platform/x11/export/export.h
@@ -28,4 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifndef X11_EXPORT_H
+#define X11_EXPORT_H
+
void register_x11_exporter();
+
+#endif // X11_EXPORT_H
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index a9fe7275c2..1aacc6a250 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -340,7 +340,10 @@ void JoypadLinux::open_joypad(const char *p_path) {
(test_bit(ABS_X, absbit) || test_bit(ABS_Y, absbit) || test_bit(ABS_HAT0X, absbit) ||
test_bit(ABS_GAS, absbit) || test_bit(ABS_RUDDER, absbit)) &&
(test_bit(BTN_A, keybit) || test_bit(BTN_THUMBL, keybit) ||
- test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit)))) {
+ test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit))) &&
+ !(test_bit(EV_ABS, evbit) &&
+ test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit) &&
+ test_bit(ABS_RX, absbit) && test_bit(ABS_RY, absbit))) {
close(fd);
return;
}
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index e1f7691cf6..772913980b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -267,6 +267,9 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
unsigned long valuemask = CWBorderPixel | CWColormap | CWEventMask;
x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo->screen), 0, 0, OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height, 0, visualInfo->depth, InputOutput, visualInfo->visual, valuemask, &windowAttributes);
+ wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
+ XSetWMProtocols(x11_display, x11_window, &wm_delete, 1);
+
//set_class_hint(x11_display, x11_window);
XMapWindow(x11_display, x11_window);
XFlush(x11_display);
@@ -476,9 +479,6 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
/* set the titlebar name */
XStoreName(x11_display, x11_window, "Godot");
- wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
- XSetWMProtocols(x11_display, x11_window, &wm_delete, 1);
-
im_active = false;
im_position = Vector2();