From 30572321f7e51658be549ba6737123ed4e0a661f Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Sat, 18 Nov 2023 11:45:24 -0500 Subject: [PATCH] fix: force wayland should work for BSD, also remove a unnecessary env check for macOS --- src/main.cc | 2 +- src/ui/mainwindow.cc | 2 +- website/mkdocs.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cc b/src/main.cc index db8a24f6..9fda4c60 100644 --- a/src/main.cc +++ b/src/main.cc @@ -307,7 +307,7 @@ void processCommandLine( QCoreApplication * app, GDOptions * result ) int main( int argc, char ** argv ) { -#ifdef Q_OS_UNIX +#if defined( Q_OS_UNIX ) && !defined( Q_OS_MACOS ) // GoldenDict use lots of X11 functions and it currently cannot work // natively on Wayland. This workaround will force GoldenDict to use // XWayland. diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 771df2bb..8bff378b 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -2856,7 +2856,7 @@ void MainWindow::toggleMainWindow( bool onlyShow ) void MainWindow::installHotKeys() { -#if defined( Q_OS_LINUX ) +#if defined( Q_OS_UNIX ) && !defined( Q_OS_MACOS ) if ( !qEnvironmentVariableIsEmpty( "GOLDENDICT_FORCE_WAYLAND" ) ) { return; } diff --git a/website/mkdocs.yml b/website/mkdocs.yml index 5a592294..be344e76 100644 --- a/website/mkdocs.yml +++ b/website/mkdocs.yml @@ -44,7 +44,7 @@ nav: - Custom transliteration: topic_transliteration.md - Customize Dictionary: custom_dictionary.md - OCR Integration: howto/ocr.md - - Wayland/Linux: topic_wayland.md + - Wayland: topic_wayland.md - Report Bugs & Feedbacks: feedbacks.md - Contributor Guides: - Developer: developer.md