diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-29 11:24:42 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-29 11:24:42 +0200 |
| commit | fdb3f610e564c644ab0fc7fd154562258350084a (patch) | |
| tree | 9073f6d178e12d075ed95ce69368ee41a3c2751c /src/Compositor.cpp | |
| parent | d2e1899f2644f0b5f62275c771d6e6be24025e4f (diff) | |
Added wlr_foreign_toplevel_v1
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index eb2c9f92..49844286 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -102,6 +102,8 @@ CCompositor::CCompositor() { m_sWLRVKeyboardMgr = wlr_virtual_keyboard_manager_v1_create(m_sWLDisplay); m_sWLRVirtPtrMgr = wlr_virtual_pointer_manager_v1_create(m_sWLDisplay); + + m_sWLRToplevelMgr = wlr_foreign_toplevel_manager_v1_create(m_sWLDisplay); } CCompositor::~CCompositor() { @@ -442,6 +444,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); wlr_seat_pointer_clear_focus(m_sSeat.seat); } + + if (PLASTWINDOW->m_phForeignToplevel) + wlr_foreign_toplevel_handle_v1_set_activated(PLASTWINDOW->m_phForeignToplevel, false); } m_pLastWindow = PLASTWINDOW; @@ -460,6 +465,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // Send an event g_pEventManager->postEvent(SHyprIPCEvent("activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle)); + + if (pWindow->m_phForeignToplevel) + wlr_foreign_toplevel_handle_v1_set_activated(pWindow->m_phForeignToplevel, true); } void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { |
