Changeset View
Changeset View
Standalone View
Standalone View
composite.cpp
Show All 29 Lines | |||||
30 | #include "overlaywindow.h" | 30 | #include "overlaywindow.h" | ||
31 | #include "scene.h" | 31 | #include "scene.h" | ||
32 | #include "scene_xrender.h" | 32 | #include "scene_xrender.h" | ||
33 | #include "scene_opengl.h" | 33 | #include "scene_opengl.h" | ||
34 | #include "scene_qpainter.h" | 34 | #include "scene_qpainter.h" | ||
35 | #include "screens.h" | 35 | #include "screens.h" | ||
36 | #include "shadow.h" | 36 | #include "shadow.h" | ||
37 | #include "useractions.h" | 37 | #include "useractions.h" | ||
38 | #include "compositingprefs.h" | | |||
39 | #include "xcbutils.h" | 38 | #include "xcbutils.h" | ||
40 | #include "platform.h" | 39 | #include "platform.h" | ||
41 | #include "shell_client.h" | 40 | #include "shell_client.h" | ||
42 | #include "wayland_server.h" | 41 | #include "wayland_server.h" | ||
43 | #include "decorations/decoratedclient.h" | 42 | #include "decorations/decoratedclient.h" | ||
44 | 43 | | |||
45 | #include <KWayland/Server/surface_interface.h> | 44 | #include <KWayland/Server/surface_interface.h> | ||
46 | 45 | | |||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | 159 | if (m_suspended) { | |||
165 | if (m_suspended & BlockRuleSuspend) { | 164 | if (m_suspended & BlockRuleSuspend) { | ||
166 | reasons << QStringLiteral("Disabled by Window"); | 165 | reasons << QStringLiteral("Disabled by Window"); | ||
167 | } | 166 | } | ||
168 | if (m_suspended & ScriptSuspend) { | 167 | if (m_suspended & ScriptSuspend) { | ||
169 | reasons << QStringLiteral("Disabled by Script"); | 168 | reasons << QStringLiteral("Disabled by Script"); | ||
170 | } | 169 | } | ||
171 | qCDebug(KWIN_CORE) << "Compositing is suspended, reason:" << reasons; | 170 | qCDebug(KWIN_CORE) << "Compositing is suspended, reason:" << reasons; | ||
172 | return; | 171 | return; | ||
173 | } else if (!CompositingPrefs::compositingPossible()) { | 172 | } else if (!kwinApp()->platform()->compositingPossible()) { | ||
174 | qCCritical(KWIN_CORE) << "Compositing is not possible"; | 173 | qCCritical(KWIN_CORE) << "Compositing is not possible"; | ||
175 | return; | 174 | return; | ||
176 | } | 175 | } | ||
177 | m_starting = true; | 176 | m_starting = true; | ||
178 | 177 | | |||
179 | if (!options->isCompositingInitialized()) { | 178 | if (!options->isCompositingInitialized()) { | ||
180 | options->reloadCompositingSettings(true); | 179 | options->reloadCompositingSettings(true); | ||
181 | slotCompositingOptionsInitialized(); | 180 | slotCompositingOptionsInitialized(); | ||
Show All 24 Lines | 201 | case OpenGLCompositing: { | |||
206 | KSharedConfigPtr unsafeConfigPtr = kwinApp()->config(); | 205 | KSharedConfigPtr unsafeConfigPtr = kwinApp()->config(); | ||
207 | KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing"); | 206 | KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing"); | ||
208 | const QString openGLIsUnsafe = QLatin1String("OpenGLIsUnsafe") + (is_multihead ? QString::number(screen_number) : QString()); | 207 | const QString openGLIsUnsafe = QLatin1String("OpenGLIsUnsafe") + (is_multihead ? QString::number(screen_number) : QString()); | ||
209 | if (unsafeConfig.readEntry(openGLIsUnsafe, false)) | 208 | if (unsafeConfig.readEntry(openGLIsUnsafe, false)) | ||
210 | qCWarning(KWIN_CORE) << "KWin has detected that your OpenGL library is unsafe to use"; | 209 | qCWarning(KWIN_CORE) << "KWin has detected that your OpenGL library is unsafe to use"; | ||
211 | else { | 210 | else { | ||
212 | unsafeConfig.writeEntry(openGLIsUnsafe, true); | 211 | unsafeConfig.writeEntry(openGLIsUnsafe, true); | ||
213 | unsafeConfig.sync(); | 212 | unsafeConfig.sync(); | ||
214 | if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL && !kwinApp()->shouldUseWaylandForCompositing() && !CompositingPrefs::hasGlx()) { | 213 | if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL && !kwinApp()->shouldUseWaylandForCompositing() && !Xcb::Extensions::self()->hasGlx()) { | ||
215 | unsafeConfig.writeEntry(openGLIsUnsafe, false); | 214 | unsafeConfig.writeEntry(openGLIsUnsafe, false); | ||
216 | unsafeConfig.sync(); | 215 | unsafeConfig.sync(); | ||
217 | qCDebug(KWIN_CORE) << "No glx extensions available"; | 216 | qCDebug(KWIN_CORE) << "No glx extensions available"; | ||
218 | break; | 217 | break; | ||
219 | } | 218 | } | ||
220 | 219 | | |||
221 | m_scene = SceneOpenGL::createScene(this); | 220 | m_scene = SceneOpenGL::createScene(this); | ||
222 | 221 | | |||
▲ Show 20 Lines • Show All 1108 Lines • Show Last 20 Lines |