Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 2126 Lines • ▼ Show 20 Line(s) | 2124 | { | |||
---|---|---|---|---|---|
2127 | } | 2127 | } | ||
2128 | const bool isScreenLocked = waylandServer() && waylandServer()->isScreenLocked(); | 2128 | const bool isScreenLocked = waylandServer() && waylandServer()->isScreenLocked(); | ||
2129 | // TODO: check whether the unmanaged wants input events at all | 2129 | // TODO: check whether the unmanaged wants input events at all | ||
2130 | if (!isScreenLocked) { | 2130 | if (!isScreenLocked) { | ||
2131 | // if an effect overrides the cursor we don't have a window to focus | 2131 | // if an effect overrides the cursor we don't have a window to focus | ||
2132 | if (effects && static_cast<EffectsHandlerImpl*>(effects)->isMouseInterception()) { | 2132 | if (effects && static_cast<EffectsHandlerImpl*>(effects)->isMouseInterception()) { | ||
2133 | return nullptr; | 2133 | return nullptr; | ||
2134 | } | 2134 | } | ||
2135 | const UnmanagedList &unmanaged = Workspace::self()->unmanagedList(); | 2135 | const QList<Unmanaged *> &unmanaged = Workspace::self()->unmanagedList(); | ||
2136 | foreach (Unmanaged *u, unmanaged) { | 2136 | foreach (Unmanaged *u, unmanaged) { | ||
2137 | if (u->inputGeometry().contains(pos) && acceptsInput(u, pos)) { | 2137 | if (u->inputGeometry().contains(pos) && acceptsInput(u, pos)) { | ||
2138 | return u; | 2138 | return u; | ||
2139 | } | 2139 | } | ||
2140 | } | 2140 | } | ||
2141 | } | 2141 | } | ||
2142 | return findManagedToplevel(pos); | 2142 | return findManagedToplevel(pos); | ||
2143 | } | 2143 | } | ||
2144 | 2144 | | |||
2145 | Toplevel *InputRedirection::findManagedToplevel(const QPoint &pos) | 2145 | Toplevel *InputRedirection::findManagedToplevel(const QPoint &pos) | ||
2146 | { | 2146 | { | ||
2147 | if (!Workspace::self()) { | 2147 | if (!Workspace::self()) { | ||
2148 | return nullptr; | 2148 | return nullptr; | ||
2149 | } | 2149 | } | ||
2150 | const bool isScreenLocked = waylandServer() && waylandServer()->isScreenLocked(); | 2150 | const bool isScreenLocked = waylandServer() && waylandServer()->isScreenLocked(); | ||
2151 | const ToplevelList &stacking = Workspace::self()->stackingOrder(); | 2151 | const QList<Toplevel *> &stacking = Workspace::self()->stackingOrder(); | ||
2152 | if (stacking.isEmpty()) { | 2152 | if (stacking.isEmpty()) { | ||
2153 | return nullptr; | 2153 | return nullptr; | ||
2154 | } | 2154 | } | ||
2155 | auto it = stacking.end(); | 2155 | auto it = stacking.end(); | ||
2156 | do { | 2156 | do { | ||
2157 | --it; | 2157 | --it; | ||
2158 | Toplevel *t = (*it); | 2158 | Toplevel *t = (*it); | ||
2159 | if (t->isDeleted()) { | 2159 | if (t->isDeleted()) { | ||
▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines |