summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp6
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp21
2 files changed, 14 insertions, 13 deletions
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp
index 75c23655f2..41d1f1d050 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -81,7 +81,7 @@ void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
List<String> args;
if (program.ends_with("zenity")) {
- args.push_back("--error");
+ args.push_back("--warning");
args.push_back("--width");
args.push_back("500");
args.push_back("--title");
@@ -91,7 +91,9 @@ void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
}
if (program.ends_with("kdialog")) {
- args.push_back("--error");
+ // `--sorry` uses the same icon as `--warning` in Zenity.
+ // As of KDialog 22.12.1, its `--warning` options are only available for yes/no questions.
+ args.push_back("--sorry");
args.push_back(p_alert);
args.push_back("--title");
args.push_back(p_title);
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 8377e81a53..525c62fbf2 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -3834,10 +3834,6 @@ void DisplayServerX11::process_events() {
for (uint32_t event_index = 0; event_index < events.size(); ++event_index) {
XEvent &event = events[event_index];
- if (ignore_events) {
- XFreeEventData(x11_display, &event.xcookie);
- continue;
- }
bool ime_window_event = false;
WindowID window_id = MAIN_WINDOW_ID;
@@ -3867,7 +3863,7 @@ void DisplayServerX11::process_events() {
_refresh_device_info();
} break;
case XI_RawMotion: {
- if (ime_window_event) {
+ if (ime_window_event || ignore_events) {
break;
}
XIRawEvent *raw_event = (XIRawEvent *)event_data;
@@ -3972,7 +3968,7 @@ void DisplayServerX11::process_events() {
#ifdef TOUCH_ENABLED
case XI_TouchBegin:
case XI_TouchEnd: {
- if (ime_window_event) {
+ if (ime_window_event || ignore_events) {
break;
}
bool is_begin = event_data->evtype == XI_TouchBegin;
@@ -4005,7 +4001,7 @@ void DisplayServerX11::process_events() {
} break;
case XI_TouchUpdate: {
- if (ime_window_event) {
+ if (ime_window_event || ignore_events) {
break;
}
HashMap<int, Vector2>::Iterator curr_pos_elem = xi.state.find(index);
@@ -4109,7 +4105,7 @@ void DisplayServerX11::process_events() {
case FocusIn: {
DEBUG_LOG_X11("[%u] FocusIn window=%lu (%u), mode='%u' \n", frame, event.xfocus.window, window_id, event.xfocus.mode);
- if (ime_window_event) {
+ if (ime_window_event || (event.xfocus.detail == NotifyInferior)) {
break;
}
@@ -4157,7 +4153,7 @@ void DisplayServerX11::process_events() {
case FocusOut: {
DEBUG_LOG_X11("[%u] FocusOut window=%lu (%u), mode='%u' \n", frame, event.xfocus.window, window_id, event.xfocus.mode);
WindowData &wd = windows[window_id];
- if (wd.ime_active && event.xfocus.detail == NotifyInferior) {
+ if (ime_window_event || (event.xfocus.detail == NotifyInferior)) {
break;
}
if (wd.ime_active) {
@@ -4227,7 +4223,7 @@ void DisplayServerX11::process_events() {
case ButtonPress:
case ButtonRelease: {
- if (ime_window_event) {
+ if (ime_window_event || ignore_events) {
break;
}
/* exit in case of a mouse button press */
@@ -4328,7 +4324,7 @@ void DisplayServerX11::process_events() {
} break;
case MotionNotify: {
- if (ime_window_event) {
+ if (ime_window_event || ignore_events) {
break;
}
// The X11 API requires filtering one-by-one through the motion
@@ -4476,6 +4472,9 @@ void DisplayServerX11::process_events() {
} break;
case KeyPress:
case KeyRelease: {
+ if (ignore_events) {
+ break;
+ }
#ifdef DISPLAY_SERVER_X11_DEBUG_LOGS_ENABLED
if (event.type == KeyPress) {
DEBUG_LOG_X11("[%u] KeyPress window=%lu (%u), keycode=%u, time=%lu \n", frame, event.xkey.window, window_id, event.xkey.keycode, event.xkey.time);