Remove some AbstractClient plumbing casts in input.cpp
This commit is contained in:
parent
507bad4843
commit
328f51ce10
1 changed files with 7 additions and 9 deletions
|
@ -350,10 +350,9 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto t = input()->findToplevel(event->globalPos());
|
auto window = input()->findToplevel(event->globalPos());
|
||||||
auto client = static_cast<AbstractClient *>(t && t->isClient() ? t : nullptr);
|
if (window->isClient() && window->isLockScreen()) {
|
||||||
if (client && client->isLockScreen()) {
|
workspace()->activateClient(window);
|
||||||
workspace()->activateClient(client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto seat = waylandServer()->seat();
|
auto seat = waylandServer()->seat();
|
||||||
|
@ -3300,12 +3299,11 @@ void InputDeviceHandler::updateFocus()
|
||||||
void InputDeviceHandler::updateDecoration()
|
void InputDeviceHandler::updateDecoration()
|
||||||
{
|
{
|
||||||
Decoration::DecoratedClientImpl *decoration = nullptr;
|
Decoration::DecoratedClientImpl *decoration = nullptr;
|
||||||
auto t = m_hover.window.data();
|
auto hover = m_hover.window.data();
|
||||||
auto ac = static_cast<AbstractClient *>(t && t->isClient() ? t : nullptr);
|
if (hover && hover->decoratedClient()) {
|
||||||
if (ac && ac->decoratedClient()) {
|
if (!hover->clientGeometry().contains(position().toPoint())) {
|
||||||
if (!ac->clientGeometry().contains(position().toPoint())) {
|
|
||||||
// input device above decoration
|
// input device above decoration
|
||||||
decoration = ac->decoratedClient();
|
decoration = hover->decoratedClient();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue