Hello community,

here is the log from the commit of package libqt5-qtwayland for 
openSUSE:Factory checked in at 2014-12-21 11:57:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtwayland (Old)
 and      /work/SRC/openSUSE:Factory/.libqt5-qtwayland.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqt5-qtwayland"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtwayland/libqt5-qtwayland.changes        
2014-10-18 09:09:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libqt5-qtwayland.new/libqt5-qtwayland.changes   
2014-12-21 11:56:44.000000000 +0100
@@ -1,0 +2,16 @@
+Wed Dec 10 11:00:13 UTC 2014 - [email protected]
+
+- Update to 5.4 Final
+  * For more details please see:
+    http://blog.qt.digia.com/blog/2014/12/10/qt-5-4-released/
+    and http://qt-project.org/wiki/New-Features-in-Qt-5.4
+
+-------------------------------------------------------------------
+Thu Nov 27 15:58:49 UTC 2014 - [email protected]
+
+- Update to 5.4 RC
+  * For more details please see:
+    
http://blog.qt.digia.com/blog/2014/11/27/qt-5-4-release-candidate-available/
+    and http://qt-project.org/wiki/New-Features-in-Qt-5.4
+
+-------------------------------------------------------------------

Old:
----
  qtwayland-opensource-src-5.4.0-beta.tar.xz

New:
----
  qtwayland-opensource-src-5.4.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqt5-qtwayland.spec ++++++
--- /var/tmp/diff_new_pack.1od4oM/_old  2014-12-21 11:56:45.000000000 +0100
+++ /var/tmp/diff_new_pack.1od4oM/_new  2014-12-21 11:56:45.000000000 +0100
@@ -19,11 +19,11 @@
 %define qt5_snapshot 0
 %define libname libQt5Compositor5
 %define base_name libqt5
-%define real_version 5.4.0-beta
+%define real_version 5.4.0
 %define so_version 5.4.0
 %define tar_version qtwayland-opensource-src-%{real_version}
 Name:           libqt5-qtwayland
-Version:        5.4.0~beta
+Version:        5.4.0
 Release:        0
 Summary:        Qt 5 Wayland Addon
 License:        SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0

++++++ qtwayland-opensource-src-5.4.0-beta.tar.xz -> 
qtwayland-opensource-src-5.4.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtwayland-opensource-src-5.4.0-beta/.tag 
new/qtwayland-opensource-src-5.4.0/.tag
--- old/qtwayland-opensource-src-5.4.0-beta/.tag        2014-10-14 
18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/.tag     2014-12-05 17:24:58.000000000 
+0100
@@ -1 +1 @@
-5558b42ff8536efdacb94b85a9bd4a00217314df
+7882407bb6bab6c042fd20592a63a875b74eb581
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandcursor.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandcursor.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandcursor.cpp       
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandcursor.cpp    
2014-12-05 17:24:57.000000000 +0100
@@ -66,12 +66,15 @@
     if (!hasCursorSize || cursorSize <= 0)
         cursorSize = 32;
     mCursorTheme = wl_cursor_theme_load(cursorTheme, cursorSize, 
mDisplay->shm());
+    if (!mCursorTheme)
+        qDebug() << "Could not load theme" << cursorTheme;
     initCursorMap();
 }
 
 QWaylandCursor::~QWaylandCursor()
 {
-    wl_cursor_theme_destroy(mCursorTheme);
+    if (mCursorTheme)
+        wl_cursor_theme_destroy(mCursorTheme);
 }
 
 struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape)
@@ -160,6 +163,9 @@
 
     //If the cursor has not been loaded already, load it
     if (!cursor) {
+        if (!mCursorTheme)
+            return NULL;
+
         QList<QByteArray> cursorNames = mCursorNamesMap.values(shape);
         foreach (QByteArray name, cursorNames) {
             cursor = wl_cursor_theme_get_cursor(mCursorTheme, 
name.constData());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylanddisplay.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylanddisplay.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylanddisplay.cpp      
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylanddisplay.cpp   
2014-12-05 17:24:57.000000000 +0100
@@ -226,13 +226,14 @@
     struct ::wl_registry *registry = object();
 
     if (interface == QStringLiteral("wl_output")) {
-        QWaylandScreen *screen = new QWaylandScreen(this, id);
+        QWaylandScreen *screen = new QWaylandScreen(this, version, id);
         mScreens.append(screen);
         // We need to get the output events before creating surfaces
         forceRoundTrip();
         mWaylandIntegration->screenAdded(screen);
     } else if (interface == QStringLiteral("wl_compositor")) {
-        mCompositor.init(registry, id, 3);
+        mCompositorVersion = qMin((int)version, 3);
+        mCompositor.init(registry, id, mCompositorVersion);
     } else if (interface == QStringLiteral("wl_shm")) {
         mShm = static_cast<struct wl_shm *>(wl_registry_bind(registry, id, 
&wl_shm_interface,1));
     } else if (interface == QStringLiteral("xdg_shell")
@@ -241,7 +242,7 @@
     } else if (interface == QStringLiteral("wl_shell")){
         mShell.reset(new QtWayland::wl_shell(registry, id, 1));
     } else if (interface == QStringLiteral("wl_seat")) {
-        QWaylandInputDevice *inputDevice = new QWaylandInputDevice(this, id);
+        QWaylandInputDevice *inputDevice = new QWaylandInputDevice(this, 
version, id);
         mInputDevices.append(inputDevice);
     } else if (interface == QStringLiteral("wl_data_device_manager")) {
         mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylanddisplay_p.h 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylanddisplay_p.h
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylanddisplay_p.h      
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylanddisplay_p.h   
2014-12-05 17:24:57.000000000 +0100
@@ -116,6 +116,7 @@
 
     const struct wl_compositor *wl_compositor() const { return 
mCompositor.object(); }
     QtWayland::wl_compositor *compositor() { return &mCompositor; }
+    int compositorVersion() const { return mCompositorVersion; }
 
     QtWayland::wl_shell *shell() { return mShell.data(); }
     QtWayland::xdg_shell *shellXdg();
@@ -198,6 +199,7 @@
     int mWritableNotificationFd;
     bool mScreensInitialized;
     QList<RegistryGlobal> mGlobals;
+    int mCompositorVersion;
 
     void registry_global(uint32_t id, const QString &interface, uint32_t 
version) Q_DECL_OVERRIDE;
     void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandinputdevice.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandinputdevice.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandinputdevice.cpp  
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandinputdevice.cpp       
2014-12-05 17:24:57.000000000 +0100
@@ -228,9 +228,9 @@
     QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
 };
 
-QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, uint32_t id)
+QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int 
version, uint32_t id)
     : QObject()
-    , QtWayland::wl_seat(display->wl_registry(), id, 2)
+    , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 2))
     , mQDisplay(display)
     , mDisplay(display->wl_display())
     , mCaps(0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandinputdevice_p.h 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandinputdevice_p.h
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandinputdevice_p.h  
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandinputdevice_p.h       
2014-12-05 17:24:57.000000000 +0100
@@ -75,7 +75,7 @@
 {
     Q_OBJECT
 public:
-    QWaylandInputDevice(QWaylandDisplay *display, uint32_t id);
+    QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id);
     ~QWaylandInputDevice();
 
     uint32_t capabilities() const { return mCaps; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandintegration.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandintegration.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandintegration.cpp  
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandintegration.cpp       
2014-12-05 17:24:57.000000000 +0100
@@ -175,12 +175,14 @@
     return new QWaylandShmWindow(window);
 }
 
+#ifndef QT_NO_OPENGL
 QPlatformOpenGLContext 
*QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
 {
     if (mDisplay->clientBufferIntegration())
         return 
mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(),
 context->shareHandle());
     return 0;
 }
+#endif // QT_NO_OPENGL
 
 QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow 
*window) const
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandintegration_p.h 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandintegration_p.h
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandintegration_p.h  
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandintegration_p.h       
2014-12-05 17:24:57.000000000 +0100
@@ -61,7 +61,9 @@
 
     bool hasCapability(QPlatformIntegration::Capability cap) const;
     QPlatformWindow *createPlatformWindow(QWindow *window) const;
+#ifndef QT_NO_OPENGL
     QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext 
*context) const;
+#endif
     QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
 
     QAbstractEventDispatcher *createEventDispatcher() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandscreen.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandscreen.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandscreen.cpp       
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandscreen.cpp    
2014-12-05 17:24:57.000000000 +0100
@@ -53,9 +53,9 @@
 
 QT_BEGIN_NAMESPACE
 
-QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, uint32_t id)
+QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, 
uint32_t id)
     : QPlatformScreen()
-    , QtWayland::wl_output(waylandDisplay->wl_registry(), id, 2)
+    , QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
     , m_outputId(id)
     , mWaylandDisplay(waylandDisplay)
     , mExtendedOutput(0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandscreen_p.h 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandscreen_p.h
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandscreen_p.h       
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandscreen_p.h    
2014-12-05 17:24:57.000000000 +0100
@@ -56,7 +56,7 @@
 class Q_WAYLAND_CLIENT_EXPORT QWaylandScreen : public QPlatformScreen, 
QtWayland::wl_output
 {
 public:
-    QWaylandScreen(QWaylandDisplay *waylandDisplay, uint32_t id);
+    QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id);
     ~QWaylandScreen();
 
     QWaylandDisplay *display() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandshmbackingstore.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandshmbackingstore.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandshmbackingstore.cpp  
    2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandshmbackingstore.cpp   
2014-12-05 17:24:57.000000000 +0100
@@ -323,6 +323,7 @@
     return static_cast<QWaylandWindow *>(window()->handle());
 }
 
+#ifndef QT_NO_OPENGL
 QImage QWaylandShmBackingStore::toImage() const
 {
     // Invoked from QPlatformBackingStore::composeAndFlush() that is called
@@ -331,6 +332,7 @@
 
     return *contentSurface();
 }
+#endif // QT_NO_OPENGL
 
 void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t 
time)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandshmbackingstore_p.h 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandshmbackingstore_p.h
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandshmbackingstore_p.h  
    2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandshmbackingstore_p.h   
2014-12-05 17:24:57.000000000 +0100
@@ -94,7 +94,9 @@
     QWaylandWindow *waylandWindow() const;
     void iterateBuffer();
 
+#ifndef QT_NO_OPENGL
     QImage toImage() const Q_DECL_OVERRIDE;
+#endif
 
 private:
     void updateDecorations();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandwindow.cpp 
new/qtwayland-opensource-src-5.4.0/src/client/qwaylandwindow.cpp
--- old/qtwayland-opensource-src-5.4.0-beta/src/client/qwaylandwindow.cpp       
2014-10-14 18:40:32.000000000 +0200
+++ new/qtwayland-opensource-src-5.4.0/src/client/qwaylandwindow.cpp    
2014-12-05 17:24:57.000000000 +0100
@@ -429,6 +429,9 @@
 
 void QWaylandWindow::handleContentOrientationChange(Qt::ScreenOrientation 
orientation)
 {
+    if (mDisplay->compositorVersion() < 2)
+        return;
+
     wl_output_transform transform;
     bool isPortrait = window()->screen() && 
window()->screen()->primaryOrientation() == Qt::PortraitOrientation;
     switch (orientation) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/compositor_api/qwaylandsurface.cpp
 
new/qtwayland-opensource-src-5.4.0/src/compositor/compositor_api/qwaylandsurface.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/compositor_api/qwaylandsurface.cpp
   2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/compositor_api/qwaylandsurface.cpp
        2014-12-05 17:24:58.000000000 +0100
@@ -330,14 +330,7 @@
 {
     QWaylandSurfaceOp op(QWaylandSurfaceOp::Close);
     if (!sendInterfaceOp(op))
-        destroySurfaceByForce();
-}
-
-void QWaylandSurface::destroySurfaceByForce()
-{
-    Q_D(QWaylandSurface);
-   wl_resource *surface_resource = d->resource()->handle;
-   wl_resource_destroy(surface_resource);
+        emit surfaceDestroyed();
 }
 
 /*!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/compositor_api/qwaylandsurface.h
 
new/qtwayland-opensource-src-5.4.0/src/compositor/compositor_api/qwaylandsurface.h
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/compositor_api/qwaylandsurface.h
     2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/compositor_api/qwaylandsurface.h
  2014-12-05 17:24:58.000000000 +0100
@@ -170,7 +170,6 @@
 
     Q_INVOKABLE void destroy();
     Q_INVOKABLE void destroySurface();
-    Q_INVOKABLE void destroySurfaceByForce();
     Q_INVOKABLE void ping();
 
     void ref();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
       2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
    2014-12-05 17:24:58.000000000 +0100
@@ -72,7 +72,8 @@
 
 ExtendedSurface::~ExtendedSurface()
 {
-    m_surface->setExtendedSurface(0);
+    if (m_surface)
+        m_surface->setExtendedSurface(0);
 }
 
 void ExtendedSurface::sendGenericProperty(const QString &name, const QVariant 
&variant)
@@ -91,6 +92,11 @@
         send_onscreen_visibility(visibility);
 }
 
+void ExtendedSurface::setParentSurface(Surface *surface)
+{
+    m_surface = surface;
+}
+
 bool ExtendedSurface::runOperation(QWaylandSurfaceOp *op)
 {
     switch (op->type()) {
@@ -141,7 +147,7 @@
     Qt::ScreenOrientations oldMask = m_contentOrientationMask;
     m_contentOrientationMask = mask;
 
-    if (mask != oldMask)
+    if (m_surface && mask != oldMask)
         emit m_surface->waylandSurface()->orientationUpdateMaskChanged();
 }
 
@@ -168,7 +174,7 @@
 {
     Q_UNUSED(resource);
     QWaylandSurface::WindowFlags windowFlags(flags);
-    if (windowFlags== m_windowFlags)
+    if (m_surface || windowFlags == m_windowFlags)
         return;
     m_windowFlags = windowFlags;
     emit m_surface->waylandSurface()->windowFlagsChanged(windowFlags);
@@ -181,12 +187,14 @@
 
 void ExtendedSurface::extended_surface_raise(Resource *)
 {
-    emit m_surface->waylandSurface()->raiseRequested();
+    if (m_surface)
+        emit m_surface->waylandSurface()->raiseRequested();
 }
 
 void ExtendedSurface::extended_surface_lower(Resource *)
 {
-    emit m_surface->waylandSurface()->lowerRequested();
+    if (m_surface)
+        emit m_surface->waylandSurface()->lowerRequested();
 }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
       2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
    2014-12-05 17:24:58.000000000 +0100
@@ -87,6 +87,7 @@
     ExtendedSurface *parent() const;
     void setParent(ExtendedSurface *parent);
     QLinkedList<QWaylandSurface *> subSurfaces() const;
+    void setParentSurface(Surface *s);
 
     Qt::ScreenOrientations contentOrientationMask() const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlkeyboard.cpp
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlkeyboard.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlkeyboard.cpp
      2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlkeyboard.cpp
   2014-12-05 17:24:58.000000000 +0100
@@ -84,11 +84,13 @@
 Keyboard::~Keyboard()
 {
 #ifndef QT_NO_WAYLAND_XKB
-    if (m_keymap_area)
-        munmap(m_keymap_area, m_keymap_size);
-    close(m_keymap_fd);
-    xkb_context_unref(m_context);
-    xkb_state_unref(m_state);
+    if (m_context) {
+        if (m_keymap_area)
+            munmap(m_keymap_area, m_keymap_size);
+        close(m_keymap_fd);
+        xkb_context_unref(m_context);
+        xkb_state_unref(m_state);
+    }
 #endif
 }
 
@@ -183,14 +185,16 @@
 void Keyboard::keyboard_bind_resource(wl_keyboard::Resource *resource)
 {
 #ifndef QT_NO_WAYLAND_XKB
-    send_keymap(resource->handle, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
-                m_keymap_fd, m_keymap_size);
-#else
+    if (m_context) {
+        send_keymap(resource->handle, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
+                    m_keymap_fd, m_keymap_size);
+        return;
+    }
+#endif
     int null_fd = open("/dev/null", O_RDONLY);
     send_keymap(resource->handle, 0 /* WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP */,
                 null_fd, 0);
     close(null_fd);
-#endif
 }
 
 void Keyboard::keyboard_destroy_resource(wl_keyboard::Resource *resource)
@@ -240,6 +244,9 @@
 void Keyboard::updateModifierState(uint code, uint32_t state)
 {
 #ifndef QT_NO_WAYLAND_XKB
+    if (!m_context)
+        return;
+
     xkb_state_update_key(m_state, code, state == WL_KEYBOARD_KEY_STATE_PRESSED 
? XKB_KEY_DOWN : XKB_KEY_UP);
 
     uint32_t modsDepressed = xkb_state_serialize_mods(m_state, 
(xkb_state_component)XKB_STATE_DEPRESSED);
@@ -269,6 +276,9 @@
 {
     m_pendingKeymap = false;
 #ifndef QT_NO_WAYLAND_XKB
+    if (!m_context)
+        return;
+
     createXKBKeymap();
     foreach (Resource *res, resourceMap()) {
         send_keymap(res->handle, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, 
m_keymap_fd, m_keymap_size);
@@ -303,8 +313,10 @@
     if (fd < 0)
         return -1;
 
-    if (ftruncate(fd, size) < 0)
+    if (ftruncate(fd, size) < 0) {
+        close(fd);
         return -1;
+    }
 
     return fd;
 }
@@ -312,11 +324,19 @@
 void Keyboard::initXKB()
 {
     m_context = xkb_context_new(static_cast<xkb_context_flags>(0));
+    if (!m_context) {
+        qWarning("Failed to create a XKB context: keymap will not be 
supported");
+        return;
+    }
+
     createXKBKeymap();
 }
 
 void Keyboard::createXKBKeymap()
 {
+    if (!m_context)
+        return;
+
     if (m_state)
         xkb_state_unref(m_state);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlshellsurface.cpp
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlshellsurface.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlshellsurface.cpp
  2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlshellsurface.cpp
       2014-12-05 17:24:58.000000000 +0100
@@ -91,7 +91,6 @@
     , wl_shell_surface(client, id, 1)
     , m_shell(shell)
     , m_surface(surface)
-    , m_deleting(false)
     , m_resizeGrabber(0)
     , m_moveGrabber(0)
     , m_popupGrabber(0)
@@ -104,13 +103,6 @@
 
 ShellSurface::~ShellSurface()
 {
-    // We must destroy the wl_resource here, but be careful not to do it
-    // if we're here from shell_surface_destroy_resource(), i.e. if the
-    // wl_resource was destroyed already
-    if (!m_deleting) {
-        m_deleting = true;
-        wl_resource_destroy(resource()->handle);
-    }
 }
 
 void ShellSurface::sendConfigure(uint32_t edges, int32_t width, int32_t height)
@@ -200,11 +192,7 @@
     if (m_popupGrabber)
         m_popupGrabber->removePopup(this);
 
-    // If we're here from the destructor don't delete this again
-    if (!m_deleting) {
-        m_deleting = true;
-        delete this;
-    }
+    delete this;
 }
 
 void ShellSurface::shell_surface_move(Resource *resource,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlshellsurface_p.h
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlshellsurface_p.h
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlshellsurface_p.h
  2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlshellsurface_p.h
       2014-12-05 17:24:58.000000000 +0100
@@ -112,7 +112,6 @@
     Shell *m_shell;
     Surface *m_surface;
     QWaylandSurfaceView *m_view;
-    bool m_deleting;
 
     ShellSurfaceResizeGrabber *m_resizeGrabber;
     ShellSurfaceMoveGrabber *m_moveGrabber;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlsurface.cpp
 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlsurface.cpp
--- 
old/qtwayland-opensource-src-5.4.0-beta/src/compositor/wayland_wrapper/qwlsurface.cpp
       2014-10-14 18:40:32.000000000 +0200
+++ 
new/qtwayland-opensource-src-5.4.0/src/compositor/wayland_wrapper/qwlsurface.cpp
    2014-12-05 17:24:58.000000000 +0100
@@ -338,8 +338,7 @@
 void Surface::surface_destroy_resource(Resource *)
 {
     if (m_extendedSurface) {
-        if (m_extendedSurface->resource())
-            wl_resource_destroy(m_extendedSurface->resource()->handle);
+        m_extendedSurface->setParentSurface(Q_NULLPTR);
         m_extendedSurface = 0;
     }
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to