From bfece23e7764545a012799a6f8a7128886841e1e Mon Sep 17 00:00:00 2001 From: pit-ray Date: Mon, 12 Feb 2024 02:34:39 +0900 Subject: [PATCH] support win10 --- .github/workflows/codeql.yml | 1 + .github/workflows/coverity.yml | 1 + README.md | 18 ++++++++++++++---- include/fluent_tray.hpp | 9 +++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 98babdd..11d0207 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,6 +16,7 @@ on: - cron: '0 18 * * 4' push: + branches: [ main ] tags: - v*.*.* diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index b696757..e44c36e 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -5,6 +5,7 @@ on: - cron: '0 18 * * 3' push: + branches: [ main ] tags: - v*.*.* - coverity* diff --git a/README.md b/README.md index ae28e40..ba37bc9 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,20 @@

Fluent Design-based GUI Library for System Tray Applications

:fire:Warning: This project is still under development. Do not use it in a production environment.:fire:

- - Coverity Scan Build Status - +

+ + Coverity Scan Build Status + + + + + + + + + +

## Concept fluent-tray provides a simple system tray icon and menu to easily create resident applications that do not require complex windows. diff --git a/include/fluent_tray.hpp b/include/fluent_tray.hpp index 582467d..3a6eb35 100644 --- a/include/fluent_tray.hpp +++ b/include/fluent_tray.hpp @@ -18,7 +18,14 @@ #include #include + +#if defined(DWMWA_COLOR_DEFAULT) +#define FLUENT_TRAY_DWMWA_AVAIABLE 1 +#endif + +#if defined(FLUENT_TRAY_DWMWA_AVAIABLE) #pragma comment(lib, "Dwmapi") +#endif namespace fluent_tray @@ -582,6 +589,7 @@ namespace fluent_tray // Set rounded window for Windows 11 only. if(round_corner) { +#if defined(FLUENT_TRAY_DWMWA_AVAIABLE) auto pref = DWMWCP_ROUND ; if(DwmSetWindowAttribute( hwnd_, @@ -589,6 +597,7 @@ namespace fluent_tray &pref, sizeof(pref)) != S_OK) { return false ; } +#endif } if(!change_icon(icon_path)) {