Changeset View
Changeset View
Standalone View
Standalone View
src/kstyle/kstyle.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 98 | if ((event->type() == QEvent::Show && qApp->property(s_schemePropertyName).isValid()) || | |||
---|---|---|---|---|---|
99 | (event->type() == QEvent::PaletteChange)) { | 99 | (event->type() == QEvent::PaletteChange)) { | ||
100 | installColorScheme(w); | 100 | installColorScheme(w); | ||
101 | } | 101 | } | ||
102 | return QObject::eventFilter(object, event); | 102 | return QObject::eventFilter(object, event); | ||
103 | } | 103 | } | ||
104 | 104 | | |||
105 | void ColorSchemeFilter::installColorScheme(QWidget *w) | 105 | void ColorSchemeFilter::installColorScheme(QWidget *w) | ||
106 | { | 106 | { | ||
107 | if (!w || !w->isTopLevel()) { | 107 | // ensure we don't call winId() on non-native widgets, bug 412675 | ||
108 | if (!w || !w->isTopLevel() || !w->windowHandle()) { | ||||
108 | return; | 109 | return; | ||
109 | } | 110 | } | ||
110 | #if HAVE_X11 | 111 | #if HAVE_X11 | ||
111 | static const bool s_x11 = QX11Info::isPlatformX11(); | 112 | static const bool s_x11 = QX11Info::isPlatformX11(); | ||
112 | if (!s_x11) { | 113 | if (!s_x11) { | ||
113 | return; | 114 | return; | ||
114 | } | 115 | } | ||
115 | static xcb_atom_t atom = XCB_ATOM_NONE; | 116 | static xcb_atom_t atom = XCB_ATOM_NONE; | ||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |