summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylanddisplay.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-04-07 14:25:02 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-04-07 14:26:59 (GMT)
commitc238398e8e120c870c7581dc3a415c5d8d910e88 (patch)
tree8ff6c62ce84ba6307c9678f6b1b53f8f83be9c3f /src/plugins/platforms/wayland/qwaylanddisplay.h
parent2149763b7293be2360beb3ec1fe9117c508eedd1 (diff)
downloadQt-c238398e8e120c870c7581dc3a415c5d8d910e88.zip
Qt-c238398e8e120c870c7581dc3a415c5d8d910e88.tar.gz
Qt-c238398e8e120c870c7581dc3a415c5d8d910e88.tar.bz2
Made wayland plugin single-threaded, yay :)
Not calling QApplication::processEvents() in qt_init any more, and not using a write socket notifier to send data over the wayland protocol.
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.h')
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.h b/src/plugins/platforms/wayland/qwaylanddisplay.h
index 4cfb7b5..ac0ad71 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.h
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.h
@@ -55,8 +55,6 @@ class QWaylandBuffer;
class QPlatformScreen;
class QWaylandScreen;
class QWaylandGLIntegration;
-class QWaylandEventThread;
-
class QWaylandDisplay : public QObject {
Q_OBJECT
@@ -85,17 +83,39 @@ public:
struct wl_display *wl_display() const { return mDisplay; }
public slots:
void createNewScreen(struct wl_output *output, QRect geometry);
- void displayHandleGlobal(uint32_t id, QByteArray interface, uint32_t version);
+ void readEvents();
+ void flushRequests();
private:
+ void waitForScreens();
+ void displayHandleGlobal(uint32_t id,
+ const QByteArray &interface,
+ uint32_t version);
+
struct wl_display *mDisplay;
- QWaylandEventThread *mEventThread;
struct wl_compositor *mCompositor;
struct wl_shm *mShm;
struct wl_shell *mShell;
QList<QPlatformScreen *> mScreens;
QList<QWaylandInputDevice *> mInputDevices;
+ QSocketNotifier *mReadNotifier;
+ int mFd;
+ bool mScreensInitialized;
+
+ uint32_t mSocketMask;
+
+ static const struct wl_output_listener outputListener;
+ static int sourceUpdate(uint32_t mask, void *data);
+ static void displayHandleGlobal(struct wl_display *display,
+ uint32_t id,
+ const char *interface,
+ uint32_t version, void *data);
+ static void outputHandleGeometry(void *data,
+ struct wl_output *output,
+ int32_t x, int32_t y,
+ int32_t width, int32_t height);
+
#ifdef QT_WAYLAND_GL_SUPPORT
QWaylandGLIntegration *mEglIntegration;
#endif