diff options
-rw-r--r-- | src/plugins/platforms/xcb/qxcbcursor.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbxsettings.cpp | 11 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbxsettings.h | 1 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index 15e5bf27f1..ce9e445ba2 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -549,7 +549,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) void *dpy = connection()->xlib_display(); // special case for non-standard dnd-* cursors cursor = loadCursor(dpy, cshape); - if (!cursor && !m_gtkCursorThemeInitialized) { + if (!cursor && !m_gtkCursorThemeInitialized && m_screen->xSettings()->initialized()) { QByteArray gtkCursorTheme = m_screen->xSettings()->setting("Gtk/CursorThemeName").toByteArray(); m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this); if (updateCursorTheme(dpy,gtkCursorTheme)) { diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp index 8679d502d9..141a6cc0cb 100644 --- a/src/plugins/platforms/xcb/qxcbxsettings.cpp +++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp @@ -99,6 +99,7 @@ class QXcbXSettingsPrivate public: QXcbXSettingsPrivate(QXcbScreen *screen) : screen(screen) + , initialized(false) { } @@ -202,6 +203,7 @@ public: QXcbScreen *screen; xcb_window_t x_settings_window; QMap<QByteArray, QXcbXSettingsPropertyValue> settings; + bool initialized; }; @@ -217,7 +219,6 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen) xcb_generic_error_t *error = 0; xcb_intern_atom_reply_t *atom_reply = xcb_intern_atom_reply(screen->xcb_connection(),atom_cookie,&error); if (error) { - qWarning() << Q_FUNC_INFO << "Failed to find XSETTINGS_S atom"; free(error); return; } @@ -230,7 +231,6 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen) xcb_get_selection_owner_reply_t *selection_result = xcb_get_selection_owner_reply(screen->xcb_connection(), selection_cookie, &error); if (error) { - qWarning() << Q_FUNC_INFO << "Failed to get selection owner for XSETTINGS_S atom"; free(error); return; } @@ -246,6 +246,13 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen) xcb_change_window_attributes(screen->xcb_connection(),d_ptr->x_settings_window,event,event_mask); d_ptr->populateSettings(d_ptr->getSettings()); + d_ptr->initialized = true; +} + +bool QXcbXSettings::initialized() const +{ + Q_D(const QXcbXSettings); + return d->initialized; } void QXcbXSettings::handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) diff --git a/src/plugins/platforms/xcb/qxcbxsettings.h b/src/plugins/platforms/xcb/qxcbxsettings.h index 16fed862bc..f6a07a6091 100644 --- a/src/plugins/platforms/xcb/qxcbxsettings.h +++ b/src/plugins/platforms/xcb/qxcbxsettings.h @@ -53,6 +53,7 @@ class QXcbXSettings : public QXcbWindowEventListener Q_DECLARE_PRIVATE(QXcbXSettings) public: QXcbXSettings(QXcbScreen *screen); + bool initialized() const; QVariant setting(const QByteArray &property) const; |