You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Detect KDE/LXQt and swap OK/Cancel buttons to Windows style.
This commit is contained in:
@@ -1142,6 +1142,10 @@ void DisplayServerWayland::cursor_set_custom_image(const Ref<Resource> &p_cursor
|
||||
}
|
||||
}
|
||||
|
||||
bool DisplayServerWayland::get_swap_cancel_ok() {
|
||||
return swap_cancel_ok;
|
||||
}
|
||||
|
||||
int DisplayServerWayland::keyboard_get_layout_count() const {
|
||||
MutexLock mutex_lock(wayland_thread.mutex);
|
||||
|
||||
@@ -1450,6 +1454,10 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
r_error = ERR_UNAVAILABLE;
|
||||
context = p_context;
|
||||
|
||||
String current_desk = OS::get_singleton()->get_environment("XDG_CURRENT_DESKTOP").to_lower();
|
||||
String session_desk = OS::get_singleton()->get_environment("XDG_SESSION_DESKTOP").to_lower();
|
||||
swap_cancel_ok = (current_desk.contains("kde") || session_desk.contains("kde") || current_desk.contains("lxqt") || session_desk.contains("lxqt"));
|
||||
|
||||
Error thread_err = wayland_thread.init();
|
||||
|
||||
if (thread_err != OK) {
|
||||
|
||||
Reference in New Issue
Block a user