From 9057cad32f22e878701a55e41f1730dac0ec1797 Mon Sep 17 00:00:00 2001 From: Martin Zielinski Date: Mon, 27 Jun 2011 09:23:13 +0200 Subject: Implemented on-screen visibility handling via wayland The compositor informs the client about it's window not being visible at all. This is handled here by dispatching a ApplicationActivated/ApplicationDeactivated event. The application than is free to handle this event and stop rendering and other not needed processing. Change-Id: I1dcc3f2a4a8e63ad5cc4f89cbf82cc63f779edbf Reviewed-on: http://codereview.qt.nokia.com/763 Reviewed-by: Lasse Holmstedt Reviewed-by: Paul Olav Tvete --- .../windowmanager_integration/qwaylandwindowmanagerintegration.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h') diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h index 0e3781dbe2..ac76fd6211 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h @@ -62,9 +62,13 @@ private: static void wlHandleListenerGlobal(wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data); + static void wlHandleOnScreenVisibilityChange(void *data, struct wl_windowmanager *wl_windowmanager, int visible); private: + QWaylandDisplay *mWaylandDisplay; struct wl_windowmanager *mWaylandWindowManager; + + static const struct wl_windowmanager_listener mWindowManagerListener; }; #endif // QWAYLANDWINDOWMANAGERINTEGRATION_H -- cgit v1.2.3 From a77ce3301c2035a2aaa3c14e051dceb46ca27924 Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Mon, 4 Jul 2011 12:08:38 +0200 Subject: Add QScreenOrientationChangeEvent and rotation support to wayland client Qt Compositor propagates screen orientation changes to wayland, which are then picked up by the wayland client. The wayland client then sends a QScreenOrientationChangeEvent to QApplication, which can handle the orientation change. Change-Id: Ieb2225e52b7e3c318648f2cb21dab7937f301505 Reviewed-on: http://codereview.qt.nokia.com/1063 Reviewed-by: Matthias Ettrich --- .../wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h') diff --git a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h index ac76fd6211..6b4658c7e1 100644 --- a/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h +++ b/src/plugins/platforms/wayland/windowmanager_integration/qwaylandwindowmanagerintegration.h @@ -63,6 +63,7 @@ private: const char *interface, uint32_t version, void *data); static void wlHandleOnScreenVisibilityChange(void *data, struct wl_windowmanager *wl_windowmanager, int visible); + static void wlHandleScreenOrientationChange(void *data, struct wl_windowmanager *wl_windowmanager, int screenOrientation); private: QWaylandDisplay *mWaylandDisplay; -- cgit v1.2.3