Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.cpp
Show All 33 Lines | |||||
34 | #endif | 34 | #endif | ||
35 | 35 | | |||
36 | #include <KLocalizedString> | 36 | #include <KLocalizedString> | ||
37 | #include <KGuiItem> | 37 | #include <KGuiItem> | ||
38 | #include <KStandardAction> | 38 | #include <KStandardAction> | ||
39 | #include <KStandardGuiItem> | 39 | #include <KStandardGuiItem> | ||
40 | #include <KHelpMenu> | 40 | #include <KHelpMenu> | ||
41 | #include <KAboutData> | 41 | #include <KAboutData> | ||
42 | #include <KWindowSystem> | ||||
42 | 43 | | |||
43 | #include "SettingsDialog/SettingsDialog.h" | 44 | #include "SettingsDialog/SettingsDialog.h" | ||
44 | #include "ExportMenu.h" | 45 | #include "ExportMenu.h" | ||
45 | #include "ExportManager.h" | 46 | #include "ExportManager.h" | ||
46 | #include "SpectacleConfig.h" | 47 | #include "SpectacleConfig.h" | ||
47 | 48 | | |||
48 | KSMainWindow::KSMainWindow(bool onClickAvailable, QWidget *parent) : | 49 | KSMainWindow::KSMainWindow(bool onClickAvailable, QWidget *parent) : | ||
49 | QDialog(parent), | 50 | QDialog(parent), | ||
Show All 12 Lines | 61 | { | |||
62 | // that skips the close/hide window animation on kwin. this | 63 | // that skips the close/hide window animation on kwin. this | ||
63 | // fixes a ghost image of the spectacle window that appears | 64 | // fixes a ghost image of the spectacle window that appears | ||
64 | // on subsequent screenshots taken with the take new screenshot | 65 | // on subsequent screenshots taken with the take new screenshot | ||
65 | // button | 66 | // button | ||
66 | // | 67 | // | ||
67 | // credits for this goes to Thomas Lübking <thomas.luebking@gmail.com> | 68 | // credits for this goes to Thomas Lübking <thomas.luebking@gmail.com> | ||
68 | 69 | | |||
69 | #ifdef XCB_FOUND | 70 | #ifdef XCB_FOUND | ||
70 | if (qApp->platformName() == QStringLiteral("xcb")) { | 71 | if (KWindowSystem::isPlatformX11()) { | ||
71 | // create a window if we haven't already. note that the QWidget constructor | 72 | // create a window if we haven't already. note that the QWidget constructor | ||
72 | // should already have done this | 73 | // should already have done this | ||
73 | 74 | | |||
74 | if (winId() == 0) { | 75 | if (winId() == 0) { | ||
75 | create(0, true, true); | 76 | create(0, true, true); | ||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | // do the xcb shenanigans | 79 | // do the xcb shenanigans | ||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |