diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-05 22:49:02 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-05 22:50:34 +0200 | 
| commit | 96cd6bc12cd606154ce69889b94043c0a658fdc3 (patch) | |
| tree | ab797466f1a0ca07afd88450e89eb2d5c3ec27c0 /api | |
| parent | 48632ae113bc4a6e47756327699fa3f626b4afe9 (diff) | |
api, cv, gui, pose-widget: remove window visibility check
Causes freezes on multiple displays.
Reported and tested in realtime by: @kzfr
Diffstat (limited to 'api')
| -rw-r--r-- | api/is-window-visible.cpp | 33 | ||||
| -rw-r--r-- | api/is-window-visible.hpp | 7 | 
2 files changed, 0 insertions, 40 deletions
| diff --git a/api/is-window-visible.cpp b/api/is-window-visible.cpp deleted file mode 100644 index f70e01c8..00000000 --- a/api/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*) -{ -    return true; -} -#endif diff --git a/api/is-window-visible.hpp b/api/is-window-visible.hpp deleted file mode 100644 index 18c9251a..00000000 --- a/api/is-window-visible.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include <QWidget> -#include "export.hpp" - -OPENTRACK_API_EXPORT bool is_window_visible(const QWidget* widget); - | 
