diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-11-05 19:36:57 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-11-05 19:36:57 +0000 |
| commit | aed9d1762e1eaad70a05266fe19ed4a4dc9ba0c5 (patch) | |
| tree | cf8ddd2f6fd78ce4dddc3158cb5100118ea8d8ab /src/plugins/General/notifier | |
| parent | a3854f06f340936b246640cc71ee24a59c67504d (diff) | |
| download | qmmp-aed9d1762e1eaad70a05266fe19ed4a4dc9ba0c5.tar.gz qmmp-aed9d1762e1eaad70a05266fe19ed4a4dc9ba0c5.tar.bz2 qmmp-aed9d1762e1eaad70a05266fe19ed4a4dc9ba0c5.zip | |
notifier: added windows support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6879 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/notifier')
| -rw-r--r-- | src/plugins/General/notifier/notifier.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp index 6006cee93..2b7b2a6bf 100644 --- a/src/plugins/General/notifier/notifier.cpp +++ b/src/plugins/General/notifier/notifier.cpp @@ -34,6 +34,10 @@ #include <X11/Xutil.h> #endif +#ifdef Q_OS_WIN +#include <windows.h> +#endif + #include "popupwidget.h" #include "notifier.h" @@ -212,6 +216,19 @@ bool Notifier::hasFullscreenWindow() const XFree(prop); return false; } +#elif defined(Q_OS_WIN) +bool Notifier::hasFullscreenWindow() const +{ + if(!m_disableForFullScreen) + return false; + int width = GetSystemMetrics(SM_CXSCREEN); + int height = GetSystemMetrics(SM_CYSCREEN); + + RECT windowRect; + GetWindowRect(GetForegroundWindow(), &windowRect); + + return (width == windowRect.right - windowRect.left) && (height == windowRect.bottom - windowRect.top); +} #else bool Notifier::hasFullscreenWindow() const { |
