mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 21:35:58 +01:00
Do not set focus to NoInterventions windows
This commit is contained in:
parent
296096596b
commit
951e1c3b62
1 changed files with 6 additions and 2 deletions
|
@ -509,6 +509,12 @@ void CWindowManager::refreshDirtyWindows() {
|
||||||
|
|
||||||
void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
||||||
if (window && window != Screen->root) {
|
if (window && window != Screen->root) {
|
||||||
|
const auto PNEWFOCUS = g_pWindowManager->getWindowFromDrawable(window);
|
||||||
|
|
||||||
|
if (PNEWFOCUS && PNEWFOCUS->getNoInterventions()) {
|
||||||
|
Debug::log(LOG, "Not setting focus to a non-interventions window.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "Setting focus to " + std::to_string(window));
|
Debug::log(LOG, "Setting focus to " + std::to_string(window));
|
||||||
|
|
||||||
|
@ -530,8 +536,6 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
||||||
|
|
||||||
LastWindow = window;
|
LastWindow = window;
|
||||||
|
|
||||||
const auto PNEWFOCUS = g_pWindowManager->getWindowFromDrawable(window);
|
|
||||||
|
|
||||||
if (PNEWFOCUS) {
|
if (PNEWFOCUS) {
|
||||||
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue