Changeset View
Changeset View
Standalone View
Standalone View
workspace.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
49 | #include "scripting/scripting.h" | 49 | #include "scripting/scripting.h" | ||
50 | #ifdef KWIN_BUILD_TABBOX | 50 | #ifdef KWIN_BUILD_TABBOX | ||
51 | #include "tabbox.h" | 51 | #include "tabbox.h" | ||
52 | #endif | 52 | #endif | ||
53 | #include "unmanaged.h" | 53 | #include "unmanaged.h" | ||
54 | #include "useractions.h" | 54 | #include "useractions.h" | ||
55 | #include "virtualdesktops.h" | 55 | #include "virtualdesktops.h" | ||
56 | #include "shell_client.h" | 56 | #include "shell_client.h" | ||
57 | #include "was_user_interaction_x11_filter.h" | ||||
57 | #include "wayland_server.h" | 58 | #include "wayland_server.h" | ||
58 | #include "xcbutils.h" | 59 | #include "xcbutils.h" | ||
59 | #include "main.h" | 60 | #include "main.h" | ||
60 | #include "decorations/decorationbridge.h" | 61 | #include "decorations/decorationbridge.h" | ||
61 | // KDE | 62 | // KDE | ||
62 | #include <KConfig> | 63 | #include <KConfig> | ||
63 | #include <KConfigGroup> | 64 | #include <KConfigGroup> | ||
64 | #include <KLocalizedString> | 65 | #include <KLocalizedString> | ||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | 183 | #endif | |||
209 | 210 | | |||
210 | initShortcuts(); | 211 | initShortcuts(); | ||
211 | 212 | | |||
212 | init(); | 213 | init(); | ||
213 | } | 214 | } | ||
214 | 215 | | |||
215 | void Workspace::init() | 216 | void Workspace::init() | ||
216 | { | 217 | { | ||
218 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | ||||
219 | m_wasUserInteractionFilter.reset(new WasUserInteractionX11Filter); | ||||
220 | } | ||||
217 | updateXTime(); // Needed for proper initialization of user_time in Client ctor | 221 | updateXTime(); // Needed for proper initialization of user_time in Client ctor | ||
218 | KSharedConfigPtr config = kwinApp()->config(); | 222 | KSharedConfigPtr config = kwinApp()->config(); | ||
219 | kwinApp()->createScreens(); | 223 | kwinApp()->createScreens(); | ||
220 | Screens *screens = Screens::self(); | 224 | Screens *screens = Screens::self(); | ||
221 | // get screen support | 225 | // get screen support | ||
222 | connect(screens, SIGNAL(changed()), SLOT(desktopResized())); | 226 | connect(screens, SIGNAL(changed()), SLOT(desktopResized())); | ||
223 | screens->setConfig(config); | 227 | screens->setConfig(config); | ||
224 | screens->reconfigure(); | 228 | screens->reconfigure(); | ||
▲ Show 20 Lines • Show All 1556 Lines • ▼ Show 20 Line(s) | 1777 | { | |||
1781 | } | 1785 | } | ||
1782 | } | 1786 | } | ||
1783 | 1787 | | |||
1784 | void Workspace::markXStackingOrderAsDirty() | 1788 | void Workspace::markXStackingOrderAsDirty() | ||
1785 | { | 1789 | { | ||
1786 | m_xStackingQueryTree.reset(new Xcb::Tree(rootWindow())); | 1790 | m_xStackingQueryTree.reset(new Xcb::Tree(rootWindow())); | ||
1787 | } | 1791 | } | ||
1788 | 1792 | | |||
1793 | void Workspace::setWasUserInteraction() | ||||
1794 | { | ||||
1795 | if (was_user_interaction) { | ||||
1796 | return; | ||||
1797 | } | ||||
1798 | was_user_interaction = true; | ||||
1799 | // might be called from within the filter, so delay till we now the filter returned | ||||
1800 | QTimer::singleShot(0, this, | ||||
1801 | [this] { | ||||
1802 | m_wasUserInteractionFilter.reset(); | ||||
1803 | } | ||||
1804 | ); | ||||
1805 | } | ||||
1806 | | ||||
1789 | } // namespace | 1807 | } // namespace | ||
1790 | 1808 | |