From 5cd5631fb226e315a233473c961714ed1c73840f Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 19 Jul 2023 03:39:45 -0700 Subject: Add bringWindowToTop function to IHyprLayout (#2747) * Add bringWindowToTop function to IHyprLayout * Rename `bringWindowToTop` to `requestFocusForWindow` * Fix doc --- src/Window.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 30a0029e..6be36f5e 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -234,16 +234,7 @@ void CWindow::createToplevelHandle() { // handle events hyprListener_toplevelActivate.initCallback( - &m_phForeignToplevel->events.request_activate, - [&](void* owner, void* data) { - if (isHidden() && m_sGroupData.pNextWindow) { - // grouped, change the current to us - setGroupCurrent(this); - } - - g_pCompositor->focusWindow(this); - }, - this, "Toplevel"); + &m_phForeignToplevel->events.request_activate, [&](void* owner, void* data) { g_pLayoutManager->getCurrentLayout()->requestFocusForWindow(this); }, this, "Toplevel"); hyprListener_toplevelFullscreen.initCallback( &m_phForeignToplevel->events.request_fullscreen, -- cgit v1.2.3