Remove isVisibleOnScreen from ManagedWaylandClient
authorLasse Holmstedt <lasse.holmstedt@nokia.com>
Wed, 31 Aug 2011 14:08:05 +0000 (16:08 +0200)
committerLasse Holmstedt <lasse.holmstedt@nokia.com>
Tue, 6 Sep 2011 07:47:34 +0000 (09:47 +0200)
the values are already stored in WaylandSurfaceItem.

src/qt-compositor/wayland_wrapper/wlsurface.cpp
src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h

index def50b4..f13466d 100644 (file)
@@ -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
 }
 
index 8df72ee..3d47173 100644 (file)
@@ -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)
index dc1e97b..1692688 100644 (file)
@@ -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;
 };