From 3d48469cb43ac0609b112aea4e233276e04c4118 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 27 Jun 2022 00:25:37 +0200 Subject: fix decos with workspace offset --- src/Window.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index fbd06417..3d669e70 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -72,4 +72,9 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() { } return wlr_box{(int)POS.x, (int)POS.y, (int)SIZE.x, (int)SIZE.y}; +} + +void CWindow::updateWindowDecos() { + for (auto& wd : m_dWindowDecorations) + wd->updateWindow(this); } \ No newline at end of file -- cgit v1.2.3 From 781526dac58619fa313ca9bf86bfd712c01cb68f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:42:20 +0200 Subject: added hyprctl kill --- src/Window.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 3d669e70..fc09b330 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -77,4 +77,16 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() { void CWindow::updateWindowDecos() { for (auto& wd : m_dWindowDecorations) wd->updateWindow(this); -} \ No newline at end of file +} + +pid_t CWindow::getPID() { + pid_t PID = -1; + if (!m_bIsX11) { + const auto CLIENT = wl_resource_get_client(m_uSurface.xdg->resource); + wl_client_get_credentials(CLIENT, &PID, nullptr, nullptr); + } else { + PID = m_uSurface.xwayland->pid; + } + + return PID; +} -- cgit v1.2.3