Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleCore.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
61 | 61 | | |||
62 | // We might be using the XCB platform (with Xwayland) in a wayland session, | 62 | // We might be using the XCB platform (with Xwayland) in a wayland session, | ||
63 | // but the X11 grabber won't work in that case. So force the Wayland grabber | 63 | // but the X11 grabber won't work in that case. So force the Wayland grabber | ||
64 | // in Wayland sessions. | 64 | // in Wayland sessions. | ||
65 | if (KWindowSystem::isPlatformWayland() || qstrcmp(qgetenv("XDG_SESSION_TYPE"), "wayland") == 0) { | 65 | if (KWindowSystem::isPlatformWayland() || qstrcmp(qgetenv("XDG_SESSION_TYPE"), "wayland") == 0) { | ||
66 | mImageGrabber = new KWinWaylandImageGrabber; | 66 | mImageGrabber = new KWinWaylandImageGrabber; | ||
67 | } | 67 | } | ||
68 | #ifdef XCB_FOUND | 68 | #ifdef XCB_FOUND | ||
69 | if (!mImageGrabber && KWindowSystem::isPlatformX11()) { | 69 | else if (KWindowSystem::isPlatformX11()) { | ||
70 | mImageGrabber = new X11ImageGrabber; | 70 | mImageGrabber = new X11ImageGrabber; | ||
71 | } | 71 | } | ||
72 | #endif | 72 | #endif | ||
73 | 73 | | |||
74 | if (!mImageGrabber) { | 74 | else { | ||
75 | mImageGrabber = new DummyImageGrabber; | 75 | mImageGrabber = new DummyImageGrabber; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | setGrabMode(grabMode); | 78 | setGrabMode(grabMode); | ||
79 | mImageGrabber->setCapturePointer(guiConfig.readEntry("includePointer", true)); | 79 | mImageGrabber->setCapturePointer(guiConfig.readEntry("includePointer", true)); | ||
80 | mImageGrabber->setCaptureDecorations(guiConfig.readEntry("includeDecorations", true)); | 80 | mImageGrabber->setCaptureDecorations(guiConfig.readEntry("includeDecorations", true)); | ||
81 | 81 | | |||
82 | if ((!(mImageGrabber->onClickGrabSupported())) && (delayMsec < 0)) { | 82 | if ((!(mImageGrabber->onClickGrabSupported())) && (delayMsec < 0)) { | ||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |