mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-02 02:05:58 +01:00
simplify some local vars
This commit is contained in:
parent
336883dda3
commit
8b46d0b5a9
1 changed files with 3 additions and 5 deletions
|
@ -97,8 +97,7 @@ void CWindow::updateWindowDecos() {
|
||||||
pid_t CWindow::getPID() {
|
pid_t CWindow::getPID() {
|
||||||
pid_t PID = -1;
|
pid_t PID = -1;
|
||||||
if (!m_bIsX11) {
|
if (!m_bIsX11) {
|
||||||
const auto CLIENT = wl_resource_get_client(m_uSurface.xdg->resource);
|
wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr);
|
||||||
wl_client_get_credentials(CLIENT, &PID, nullptr, nullptr);
|
|
||||||
} else {
|
} else {
|
||||||
PID = m_uSurface.xwayland->pid;
|
PID = m_uSurface.xwayland->pid;
|
||||||
}
|
}
|
||||||
|
@ -212,8 +211,7 @@ void CWindow::moveToWorkspace(int workspaceID) {
|
||||||
if (m_iWorkspaceID != workspaceID) {
|
if (m_iWorkspaceID != workspaceID) {
|
||||||
m_iWorkspaceID = workspaceID;
|
m_iWorkspaceID = workspaceID;
|
||||||
|
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID);
|
if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); PWORKSPACE) {
|
||||||
if (PWORKSPACE) {
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())});
|
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue