Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4a9e8ff
Import adapted QtTrayMenu class from upstream
Kishi85 May 7, 2026
c217c27
Integrate upstream QtTrayMenu.h/cpp into tray_linux.cpp
Kishi85 May 7, 2026
58d5a4e
doc: Add doxygen comments for public functions of QtTrayMenu
Kishi85 May 10, 2026
b3f6529
fix: Add default initialized values and change running state tracking
Kishi85 May 10, 2026
7fb79e7
Add support for spectacle screenshots on KDE
Kishi85 May 11, 2026
4ba6f82
Revert example to non-notification variant
Kishi85 May 10, 2026
a557359
fix: Segfaults from unit tests
Kishi85 May 10, 2026
91cccc9
WIP - process events during exit
Kishi85 May 12, 2026
6172f66
Update test_tray.cpp
ReenigneArcher May 12, 2026
34d50f6
Provide default argv, hide menu, use popup
ReenigneArcher May 12, 2026
7c535db
QApplication::quit() only for apps that we created.
Kishi85 May 12, 2026
ae6a009
Cleanup QtTrayMenu constructor
Kishi85 May 12, 2026
348e744
Add option to fire notification using QSystemTray::showMessage on ini…
Kishi85 May 12, 2026
ec39a14
(Re-)Implement tray notifications using libnotify with fallback to ba…
Kishi85 May 12, 2026
eb8ac18
Refactor tray_linux.cpp notifications and add separate namespace for …
Kishi85 May 16, 2026
013564c
fix: Properly cleanup notificationCurrent and notificationCurrentCall…
Kishi85 May 16, 2026
a37fd77
refactor - Use acknowledge_notification to also clear previous notifi…
Kishi85 May 16, 2026
b496920
fix: Allow using themed icons for tray icon
Kishi85 May 16, 2026
97458b1
fix: Always use absolute paths for filesystem-based notification icons
Kishi85 May 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
"imagemagick"
"ninja-build"
"xvfb"
"libnotify-dev"
)
if [[ "${QT_VERSION}" == "5" ]]; then
Expand Down
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ else()
find_library(COCOA Cocoa REQUIRED)
list(APPEND TRAY_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/tray_darwin.m")
else()
find_package(LibNotify REQUIRED)
find_package(Qt6 COMPONENTS Widgets DBus Svg)
if(Qt6_FOUND)
set(TRAY_QT_VERSION 6)
Expand All @@ -87,7 +88,10 @@ else()
CACHE INTERNAL "Qt major version selected by tray"
)
set(CMAKE_AUTOMOC ON)
list(APPEND TRAY_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/tray_linux.cpp")
list(APPEND TRAY_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/tray_linux.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/QtTrayMenu.cpp"
)
endif()
endif()
endif()
Expand All @@ -114,6 +118,11 @@ else()
else()
list(APPEND TRAY_EXTERNAL_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg)
endif()
list(APPEND TRAY_LIBNOTIFY=1)
list(APPEND TRAY_EXTERNAL_LIBRARIES ${LIBNOTIFY_LIBRARIES})

include_directories(SYSTEM ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${LIBNOTIFY_LIBRARY_DIRS})
endif()
endif()
endif()
Expand Down
55 changes: 55 additions & 0 deletions cmake/FindLibNotify.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# - Try to find LibNotify
# This module defines the following variables:
#
# LIBNOTIFY_FOUND - LibNotify was found
# LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories
# LIBNOTIFY_LIBRARIES - link these to use LibNotify
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2014 Collabora Ltd.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

find_package(PkgConfig)
pkg_check_modules(LIBNOTIFY QUIET libnotify)

find_path(LIBNOTIFY_INCLUDE_DIRS
NAMES notify.h
HINTS ${LIBNOTIFY_INCLUDEDIR}
${LIBNOTIFY_INCLUDE_DIRS}
PATH_SUFFIXES libnotify
)

find_library(LIBNOTIFY_LIBRARIES
NAMES notify
HINTS ${LIBNOTIFY_LIBDIR}
${LIBNOTIFY_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibNotify REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES
VERSION_VAR LIBNOTIFY_VERSION)

mark_as_advanced(
LIBNOTIFY_INCLUDE_DIRS
LIBNOTIFY_LIBRARIES
)
Loading