diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-31 19:41:55 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-31 19:41:55 +0200 |
| commit | c63225b33243d581a2d57de8dbc8423f3a044cfc (patch) | |
| tree | a223fdd054eccb537e51266574592992f044f28b /src | |
| parent | 670ba55b3593cdc1bdf3d843c8f4cdd0626c3a7c (diff) | |
Log focus
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index cb45a9d5..df32f1ce 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -339,8 +339,6 @@ void CCompositor::focusWindow(CWindow* pWindow) { const auto PWINDOWSURFACE = g_pXWaylandManager->getWindowSurface(pWindow); focusSurface(PWINDOWSURFACE); - - Debug::log(LOG, "Set keyboard focus to %x, with name: %s", pWindow, pWindow->m_szTitle.c_str()); } void CCompositor::focusSurface(wlr_surface* pSurface) { @@ -364,6 +362,11 @@ void CCompositor::focusSurface(wlr_surface* pSurface) { m_pLastFocus = pSurface; g_pXWaylandManager->activateSurface(pSurface, true); + + if (const auto PWINDOW = getWindowFromSurface(pSurface); PWINDOW) + Debug::log(LOG, "Set keyboard focus to surface %x, with window name: %s", pSurface, PWINDOW->m_szTitle.c_str()); + else + Debug::log(LOG, "Set keyboard focus to surface %x", pSurface); } bool CCompositor::windowValidMapped(CWindow* pWindow) { |
