{
#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
Q_D(Surface);
- WindowManagerServerIntegration::instance()->changeScreenVisibility(d->client, visible ? 1 : 0);
+ WindowManagerServerIntegration::instance()->setVisibilityOnScreen(d->client, visible);
#endif
}
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)
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)
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);
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;
};