summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-09-21 15:10:57 +0100
committervaxerski <vaxry@vaxry.net>2022-09-21 15:11:09 +0100
commit8b46d0b5a99b7b5cbc59e1faa9437b9b2c0398bb (patch)
tree4d7a20c2ad111da68c55651d0cb8070f54445f59 /src/Window.cpp
parent336883dda3d0222ba69eb4fb8120cd540e9a878f (diff)
simplify some local vars
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 7fe14869..d547c9b4 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -97,8 +97,7 @@ void CWindow::updateWindowDecos() {
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);
+ wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr);
} else {
PID = m_uSurface.xwayland->pid;
}
@@ -212,10 +211,9 @@ void CWindow::moveToWorkspace(int workspaceID) {
if (m_iWorkspaceID != workspaceID) {
m_iWorkspaceID = workspaceID;
- const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID);
- if (PWORKSPACE) {
+ if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); PWORKSPACE) {
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())});
- }
+ }
}
}