From aed9d1762e1eaad70a05266fe19ed4a4dc9ba0c5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 5 Nov 2016 19:36:57 +0000 Subject: notifier: added windows support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6879 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/notifier/notifier.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/plugins') 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 #endif +#ifdef Q_OS_WIN +#include +#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 { -- cgit v1.2.3-13-gbd6f