summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index f96343c92c..f61ccacb98 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -93,6 +93,13 @@ const char *OS_X11::get_audio_driver_name(int p_driver) const {
return AudioDriverManager::get_driver(p_driver)->get_name();
}
+void OS_X11::initialize_core() {
+
+ crash_handler.initialize();
+
+ OS_Unix::initialize_core();
+}
+
void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
long im_event_mask = 0;
@@ -246,6 +253,11 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// borderless fullscreen window mode
if (current_videomode.fullscreen) {
+ // set bypass compositor hint
+ Atom bypass_compositor = XInternAtom(x11_display, "_NET_WM_BYPASS_COMPOSITOR", False);
+ unsigned long compositing_disable_on = 1;
+ XChangeProperty(x11_display, x11_window, bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&compositing_disable_on, 1);
+
// needed for lxde/openbox, possibly others
Hints hints;
Atom property;
@@ -695,6 +707,12 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) {
xev.xclient.data.l[2] = 0;
XSendEvent(x11_display, DefaultRootWindow(x11_display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+
+ // set bypass compositor hint
+ Atom bypass_compositor = XInternAtom(x11_display, "_NET_WM_BYPASS_COMPOSITOR", False);
+ unsigned long compositing_disable_on = p_enabled ? 1 : 0;
+ XChangeProperty(x11_display, x11_window, bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&compositing_disable_on, 1);
+
XFlush(x11_display);
if (!p_enabled && !is_window_resizable()) {
@@ -2161,6 +2179,14 @@ int OS_X11::get_power_percent_left() {
return power_manager->get_power_percent_left();
}
+void OS_X11::disable_crash_handler() {
+ crash_handler.disable();
+}
+
+bool OS_X11::is_disable_crash_handler() const {
+ return crash_handler.is_disabled();
+}
+
OS_X11::OS_X11() {
#ifdef RTAUDIO_ENABLED