Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 2072 Lines • ▼ Show 20 Line(s) | |||||
2073 | 2073 | | |||
2074 | bool InputRedirection::isSelectingWindow() const | 2074 | bool InputRedirection::isSelectingWindow() const | ||
2075 | { | 2075 | { | ||
2076 | return m_windowSelector ? m_windowSelector->isActive() : false; | 2076 | return m_windowSelector ? m_windowSelector->isActive() : false; | ||
2077 | } | 2077 | } | ||
2078 | 2078 | | |||
2079 | InputDeviceHandler::InputDeviceHandler(InputRedirection *input) | 2079 | InputDeviceHandler::InputDeviceHandler(InputRedirection *input) | ||
2080 | : QObject(input) | 2080 | : QObject(input) | ||
2081 | , m_input(input) | | |||
2082 | { | 2081 | { | ||
2083 | } | 2082 | } | ||
2084 | 2083 | | |||
2085 | InputDeviceHandler::~InputDeviceHandler() = default; | 2084 | InputDeviceHandler::~InputDeviceHandler() = default; | ||
2086 | 2085 | | |||
2087 | void InputDeviceHandler::updateDecoration(Toplevel *t, const QPointF &pos) | 2086 | void InputDeviceHandler::updateDecoration(Toplevel *t, const QPointF &pos) | ||
2088 | { | 2087 | { | ||
2089 | const auto oldDeco = m_decoration; | 2088 | const auto oldDeco = m_decoration; | ||
Show All 13 Lines | |||||
2103 | } else { | 2102 | } else { | ||
2104 | needsReset = true; | 2103 | needsReset = true; | ||
2105 | } | 2104 | } | ||
2106 | if (needsReset) { | 2105 | if (needsReset) { | ||
2107 | m_decoration.clear(); | 2106 | m_decoration.clear(); | ||
2108 | } | 2107 | } | ||
2109 | 2108 | | |||
2110 | bool leftSend = false; | 2109 | bool leftSend = false; | ||
2111 | auto oldWindow = qobject_cast<AbstractClient*>(m_window.data()); | 2110 | auto oldWindow = qobject_cast<AbstractClient*>(window().data()); | ||
2112 | if (oldWindow && (m_decoration && m_decoration->client() != oldWindow)) { | 2111 | if (oldWindow && (m_decoration && m_decoration->client() != oldWindow)) { | ||
2113 | leftSend = true; | 2112 | leftSend = true; | ||
2114 | oldWindow->leaveEvent(); | 2113 | oldWindow->leaveEvent(); | ||
2115 | } | 2114 | } | ||
2116 | 2115 | | |||
2117 | if (oldDeco && oldDeco != m_decoration) { | 2116 | if (oldDeco && oldDeco != m_decoration) { | ||
2118 | if (oldDeco->client() != t && !leftSend) { | 2117 | if (oldDeco->client() != t && !leftSend) { | ||
2119 | leftSend = true; | 2118 | leftSend = true; | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |