From efc2ae9caf3a722a676ba6d93b5356ebcd682be8 Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Wed, 31 Aug 2011 16:08:05 +0200 Subject: [PATCH] Remove isVisibleOnScreen from ManagedWaylandClient the values are already stored in WaylandSurfaceItem. --- src/qt-compositor/wayland_wrapper/wlsurface.cpp | 2 +- .../windowmanagerprotocol/waylandwindowmanagerintegration.cpp | 8 +++----- .../windowmanagerprotocol/waylandwindowmanagerintegration.h | 5 +---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.cpp b/src/qt-compositor/wayland_wrapper/wlsurface.cpp index def50b4..f13466d 100644 --- a/src/qt-compositor/wayland_wrapper/wlsurface.cpp +++ b/src/qt-compositor/wayland_wrapper/wlsurface.cpp @@ -415,7 +415,7 @@ void Surface::sendOnScreenVisibilityChange(bool visible) { #ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT Q_D(Surface); - WindowManagerServerIntegration::instance()->changeScreenVisibility(d->client, visible ? 1 : 0); + WindowManagerServerIntegration::instance()->setVisibilityOnScreen(d->client, visible); #endif } diff --git a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp b/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp index 8df72ee..3d47173 100644 --- a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp +++ b/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp @@ -71,7 +71,7 @@ public: void changeScreenVisibility(wl_client *client, int visible) { - WindowManagerServerIntegration::instance()->changeScreenVisibility(client, visible); + WindowManagerServerIntegration::instance()->setVisibilityOnScreen(client, visible); } void updateWindowProperty(wl_client *client, wl_surface *surface, const char *name, struct wl_array *value) @@ -142,12 +142,10 @@ void WindowManagerServerIntegration::authenticateWithToken(wl_client *client, co emit clientAuthenticated(client); } -void WindowManagerServerIntegration::changeScreenVisibility(wl_client *client, int visible) +void WindowManagerServerIntegration::setVisibilityOnScreen(wl_client *client, bool visible) { - m_managedClients[client]->m_isVisibleOnScreen = visible != 0; - wl_client_post_event(client, m_windowManagerObject->base(), - WL_WINDOWMANAGER_CLIENT_ONSCREEN_VISIBILITY, visible); + WL_WINDOWMANAGER_CLIENT_ONSCREEN_VISIBILITY, visible ? 1 : 0); } void WindowManagerServerIntegration::setScreenOrientation(wl_client *client, qint32 orientationInDegrees) diff --git a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h b/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h index dc1e97b..1692688 100644 --- a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h +++ b/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h @@ -69,7 +69,7 @@ public: WaylandManagedClient *managedClient(wl_client *client) const; - void changeScreenVisibility(wl_client *client, int visible); + void setVisibilityOnScreen(wl_client *client, bool visible); void setScreenOrientation(wl_client *client, qint32 orientationInDegrees); void updateOrientation(wl_client *client); @@ -100,13 +100,10 @@ public: WaylandManagedClient(); qint64 processId() const; QByteArray authenticationToken() const; - // ## TODO must be moved to Surface - bool isVisibleOnScreen() const { return m_isVisibleOnScreen; } private: qint64 m_processId; QByteArray m_authenticationToken; - bool m_isVisibleOnScreen; friend class WindowManagerServerIntegration; }; -- 2.7.4