diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2f6e982ba..7931bc311 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -61,6 +61,9 @@ jobs: devscripts \ qttools5-dev \ qttools5-dev-tools \ + libnotify-dev \ + libglib2.0-dev \ + libgdk-pixbuf2.0-dev \ && rm -rf /var/lib/apt/lists' # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). diff --git a/.github/workflows/job-test-linux-ubuntu.yml b/.github/workflows/job-test-linux-ubuntu.yml index 44b3036ce..beec526f3 100644 --- a/.github/workflows/job-test-linux-ubuntu.yml +++ b/.github/workflows/job-test-linux-ubuntu.yml @@ -16,7 +16,6 @@ jobs: matrix: include: - distro: ubuntu20.04 - - distro: ubuntu19.10 - distro: ubuntu21.04 # - distro: ubuntu18.04 #Need to install git 2.18+ # - distro: ubuntu16.04 #Need to install git 2.18+ @@ -35,4 +34,4 @@ jobs: make -j - name: Run unit test - run: ./build/bin/unittests \ No newline at end of file + run: ./build/bin/unittests diff --git a/ChangeLog b/ChangeLog index 5387415a6..69084b7d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Bug fixes: - #7036 Fix tray icon not changing theme on Big Sur - #7046 Fix MacOS 10.13 build - #7049 Scroll doesn't work in case of macOS is server +- #7055 Add secure input notification on Linux - #7052 Add secure input notification on Windows - #7047 Fix prevent sleep option on Mac and Windows diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a829137c..b2eee7c3e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,10 +19,6 @@ jobs: image: symless/synergy-core:ubuntu18.04 packager: deb name: ubuntu18 - ubuntu1910: - image: symless/synergy-core:ubuntu19.10 - packager: deb - name: ubuntu19 ubuntu2004: image: symless/synergy-core:ubuntu20.04 packager: deb diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt index 3819b591b..7bb4aed17 100644 --- a/src/lib/synergy/CMakeLists.txt +++ b/src/lib/synergy/CMakeLists.txt @@ -39,4 +39,14 @@ add_library(synlib STATIC ${sources}) if (UNIX) target_link_libraries(synlib arch client ipc net base platform mt server) -endif() \ No newline at end of file + if (NOT APPLE) + find_package(PkgConfig REQUIRED) + pkg_check_modules(lib_glib REQUIRED IMPORTED_TARGET glib-2.0) + pkg_search_module( PC_GDKPIXBUF gdk-pixbuf-2.0 ) + include_directories(${PC_GDKPIXBUF_INCLUDE_DIRS}) + pkg_check_modules(lib_gdkpixbuf REQUIRED IMPORTED_TARGET gdk-pixbuf-2.0 ) + pkg_check_modules(lib_notify REQUIRED IMPORTED_TARGET libnotify) + target_link_libraries(synlib PkgConfig::lib_glib PkgConfig::lib_gdkpixbuf PkgConfig::lib_notify) + endif() +endif() + diff --git a/src/lib/synergy/unix/AppUtilUnix.cpp b/src/lib/synergy/unix/AppUtilUnix.cpp index 7c2adec4d..067583c5c 100644 --- a/src/lib/synergy/unix/AppUtilUnix.cpp +++ b/src/lib/synergy/unix/AppUtilUnix.cpp @@ -21,6 +21,10 @@ #include "base/Log.h" #include "base/log_outputters.h" +#if WINAPI_XWINDOWS +#include +#endif + AppUtilUnix::AppUtilUnix(IEventQueue* events) { } @@ -52,6 +56,27 @@ AppUtilUnix::showNotification(const String & title, const String & text) const { LOG((CLOG_DEBUG "Showing notification. Title: \"%s\". Text: \"%s\"", title.c_str(), text.c_str())); #if WINAPI_XWINDOWS + if (!notify_init("Synergy")) + { + LOG((CLOG_INFO "Failed to initialize libnotify")); + return; + } + + auto notification = notify_notification_new (title.c_str(), text.c_str(), nullptr); + if (notification == nullptr) + { + LOG((CLOG_INFO "Failed to create notification")); + return; + } + notify_notification_set_timeout(notification, 10000); + + if (!notify_notification_show(notification, nullptr)) + { + LOG((CLOG_INFO "Failed to show notification")); + } + + g_object_unref(G_OBJECT(notification)); + notify_uninit(); #elif WINAPI_CARBON // synergys and synergyc are not allowed to send native notifications on MacOS