#include <QtGui/QGuiApplication>
#include <QtGui/QPlatformNativeInterface>
+#include <QtGui/QWindowSystemInterface>
QWaylandSurfaceExtension::QWaylandSurfaceExtension(QWaylandDisplay *display, uint32_t id)
{
QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window, struct wl_extended_surface *extended_surface)
: m_window(window)
, m_extended_surface(extended_surface)
+ , m_exposed(true)
{
wl_extended_surface_add_listener(m_extended_surface,&QWaylandExtendedSurface::extended_surface_listener,this);
}
QEvent evt(visible != 0 ? QEvent::ApplicationActivate : QEvent::ApplicationDeactivate);
QCoreApplication::sendEvent(QCoreApplication::instance(), &evt);
+
+ extendedWindow->m_exposed = visible;
+ QWaylandWindow *w = extendedWindow->m_window;
+ QWindowSystemInterface::handleSynchronousExposeEvent(w->window(),
+ visible
+ ? QRegion(w->geometry())
+ : QRegion());
}
void QWaylandExtendedSurface::set_generic_property(void *data, wl_extended_surface *wl_extended_surface, const char *name, wl_array *value)
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
+ bool isExposed() const { return m_exposed; }
+
private:
QWaylandWindow *m_window;
struct wl_extended_surface *m_extended_surface;
static const struct wl_extended_surface_listener extended_surface_listener;
+ bool m_exposed;
};
#endif // QWAYLANDEXTENDEDSURFACE_H
}
}
+
+bool QWaylandWindow::isExposed() const
+{
+ if (!window()->isVisible())
+ return false;
+ if (mExtendedWindow)
+ return mExtendedWindow->isExposed();
+ return true;
+}
+
+
void QWaylandWindow::configure(uint32_t time, uint32_t edges,
int32_t x, int32_t y,
int32_t width, int32_t height)
Qt::WindowState setWindowState(Qt::WindowState state);
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
+ bool isExposed() const;
+
protected:
QWaylandDisplay *mDisplay;
struct wl_surface *mSurface;