diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-12 18:00:49 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-12 18:00:49 +0200 |
commit | 9040b187a1c4fa380f8a12207b9dd6d04b3a10ac (patch) | |
tree | 115e1351571d690c1261a9d512e6d44e717f3051 /opentrack/is-window-visible.cpp | |
parent | 13a18b149764509a3f460be86590250cdcf690fb (diff) |
all: rename modules s#^opentrack-##. and opentrack -> api
Adjust usages.
Diffstat (limited to 'opentrack/is-window-visible.cpp')
-rw-r--r-- | opentrack/is-window-visible.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/opentrack/is-window-visible.cpp b/opentrack/is-window-visible.cpp deleted file mode 100644 index fc25bb7d..00000000 --- a/opentrack/is-window-visible.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "is-window-visible.hpp" -#include <QPoint> - -#ifdef _WIN32 - -#include <windows.h> - -OPENTRACK_API_EXPORT bool is_window_visible(const QWidget* widget) -{ - const QPoint p = widget->mapToGlobal(QPoint(0, 0)); - const QSize s = widget->size(); - - const POINT points[] = - { - { p.x(), p.y() }, - { p.x() + s.width(), p.y() }, - { p.x() + s.width(), p.y() + s.height() }, - { p.x(), p.y() + s.height() }, - { p.x() + s.width()/2, p.y() + s.height()/2 }, - }; - - for (const POINT& pt : points) - if (WindowFromPoint(pt) == (HWND) widget->winId()) - return true; - return false; -} - -#else -OPENTRACK_API_EXPORT bool is_window_visible(const QWidget* widget) -{ - return true; -} -#endif |