summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-07-02 19:43:52 +0300
committerGitHub <noreply@github.com>2022-07-02 19:43:52 +0300
commit185c4d6ea13ad5f4483aa2e389e43bd09106002f (patch)
treea7bc4a9510c39e367317b5ce64d2ee0e0a72d4f0 /src/Window.cpp
parentfc4b10d13c14c4eb08febb0637f27177cb6a1940 (diff)
parentb7b3344188e3ebd2baed14bc288ee42a1ae8d6f2 (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index fbd06417..fc09b330 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -72,4 +72,21 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() {
}
return wlr_box{(int)POS.x, (int)POS.y, (int)SIZE.x, (int)SIZE.y};
-} \ No newline at end of file
+}
+
+void CWindow::updateWindowDecos() {
+ for (auto& wd : m_dWindowDecorations)
+ wd->updateWindow(this);
+}
+
+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;
+}