summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.h
diff options
context:
space:
mode:
authorJochen Seemann <seemann.jochen@gmail.com>2016-03-24 15:22:05 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2016-04-15 04:33:33 +0000
commit1ce52b0ddd71e7029f67fb91166783a0c09d25c6 (patch)
treef16d13a019e473642e4eaab0fd843f9026fa72dd /src/plugins/platforms/winrt/qwinrtscreen.h
parent152e496cdac8529fea53ed1006851546203a60b7 (diff)
winrt: use visible bounds the get the visual area
On Windows Phone / Windows 10 Mobile, there are the status bar and sometimes a navigation bar, which are hiding the visible window area. In the Windows Phone code paths, the area of the status bar was tracked and the visual area was dynamically shrinked. This patch enables that we use ApplicationView::visibleBounds() on every target (except Windows 8.1) to get the visible area of the application. Its change event is now also used as a resize trigger for manual resizing through user. Task-number: QTBUG-51163 Change-Id: I7abe2a0978418cc941e118e212426852474c026a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h
index ac9db9bfef..a5c1d24d51 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.h
+++ b/src/plugins/platforms/winrt/qwinrtscreen.h
@@ -62,7 +62,7 @@ namespace ABI {
struct IWindow;
}
namespace ViewManagement {
- struct IStatusBar;
+ struct IApplicationView;
}
}
namespace Graphics {
@@ -85,10 +85,9 @@ class QWinRTScreen : public QPlatformScreen
public:
explicit QWinRTScreen();
~QWinRTScreen();
+
QRect geometry() const Q_DECL_OVERRIDE;
-#ifdef Q_OS_WINPHONE
QRect availableGeometry() const Q_DECL_OVERRIDE;
-#endif
int depth() const Q_DECL_OVERRIDE;
QImage::Format format() const Q_DECL_OVERRIDE;
QSizeF physicalSize() const Q_DECL_OVERRIDE;
@@ -112,10 +111,6 @@ public:
ABI::Windows::UI::Core::ICoreWindow *coreWindow() const;
ABI::Windows::UI::Xaml::IDependencyObject *canvas() const;
-#ifdef Q_OS_WINPHONE
- void setStatusBarVisibility(bool visible, QWindow *window);
-#endif
-
void initialize();
private:
@@ -127,7 +122,6 @@ private:
HRESULT onPointerEntered(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IPointerEventArgs *);
HRESULT onPointerExited(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IPointerEventArgs *);
HRESULT onPointerUpdated(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IPointerEventArgs *);
- HRESULT onSizeChanged(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *);
HRESULT onActivated(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IWindowActivatedEventArgs *);
@@ -136,10 +130,10 @@ private:
HRESULT onOrientationChanged(ABI::Windows::Graphics::Display::IDisplayInformation *, IInspectable *);
HRESULT onDpiChanged(ABI::Windows::Graphics::Display::IDisplayInformation *, IInspectable *);
-
-#ifdef Q_OS_WINPHONE
- HRESULT onStatusBarShowing(ABI::Windows::UI::ViewManagement::IStatusBar *, IInspectable *);
- HRESULT onStatusBarHiding(ABI::Windows::UI::ViewManagement::IStatusBar *, IInspectable *);
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
+ HRESULT onWindowSizeChanged(ABI::Windows::UI::ViewManagement::IApplicationView *, IInspectable *);
+#else
+ HRESULT onWindowSizeChanged(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *);
#endif
QScopedPointer<QWinRTScreenPrivate> d_ptr;