windows: refactor class member vars (#10168)

This commit is contained in:
davc0n
2025-04-28 22:25:22 +02:00
committed by GitHub
parent c505eb55ff
commit 2118440488
43 changed files with 2124 additions and 2134 deletions

View File

@@ -32,11 +32,11 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (PWINDOW->m_eSuppressedEvents & SUPPRESS_FULLSCREEN)
if UNLIKELY (PWINDOW->m_suppressedEvents & SUPPRESS_FULLSCREEN)
return;
if UNLIKELY (!PWINDOW->m_bIsMapped) {
PWINDOW->m_bWantsInitialFullscreen = true;
if UNLIKELY (!PWINDOW->m_isMapped) {
PWINDOW->m_wantsInitialFullscreen = true;
return;
}
@@ -46,7 +46,7 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if (!wpMonitor.expired()) {
const auto monitor = wpMonitor.lock();
if (PWINDOW->m_pWorkspace != monitor->activeWorkspace) {
if (PWINDOW->m_workspace != monitor->activeWorkspace) {
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, monitor->activeWorkspace);
g_pCompositor->setActiveMonitor(monitor);
}
@@ -63,7 +63,7 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (PWINDOW->m_eSuppressedEvents & SUPPRESS_FULLSCREEN)
if UNLIKELY (PWINDOW->m_suppressedEvents & SUPPRESS_FULLSCREEN)
return;
g_pCompositor->changeWindowFullscreenModeClient(PWINDOW, FSMODE_FULLSCREEN, false);
@@ -75,11 +75,11 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (PWINDOW->m_eSuppressedEvents & SUPPRESS_MAXIMIZE)
if UNLIKELY (PWINDOW->m_suppressedEvents & SUPPRESS_MAXIMIZE)
return;
if UNLIKELY (!PWINDOW->m_bIsMapped) {
PWINDOW->m_bWantsInitialFullscreen = true;
if UNLIKELY (!PWINDOW->m_isMapped) {
PWINDOW->m_wantsInitialFullscreen = true;
return;
}
@@ -92,7 +92,7 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (PWINDOW->m_eSuppressedEvents & SUPPRESS_MAXIMIZE)
if UNLIKELY (PWINDOW->m_suppressedEvents & SUPPRESS_MAXIMIZE)
return;
g_pCompositor->changeWindowFullscreenModeClient(PWINDOW, FSMODE_MAXIMIZED, false);
@@ -104,7 +104,7 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (!PWINDOW->m_bIsMapped)
if UNLIKELY (!PWINDOW->m_isMapped)
return;
g_pEventManager->postEvent(SHyprIPCEvent{.event = "minimized", .data = std::format("{:x},1", (uintptr_t)PWINDOW.get())});
@@ -116,7 +116,7 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
if UNLIKELY (!PWINDOW)
return;
if UNLIKELY (!PWINDOW->m_bIsMapped)
if UNLIKELY (!PWINDOW->m_isMapped)
return;
g_pEventManager->postEvent(SHyprIPCEvent{.event = "minimized", .data = std::format("{:x},0", (uintptr_t)PWINDOW.get())});
@@ -170,7 +170,7 @@ void CForeignToplevelHandleWlr::sendMonitor(PHLMONITOR pMonitor) {
void CForeignToplevelHandleWlr::sendState() {
const auto PWINDOW = pWindow.lock();
if UNLIKELY (!PWINDOW || !PWINDOW->m_pWorkspace || !PWINDOW->m_bIsMapped)
if UNLIKELY (!PWINDOW || !PWINDOW->m_workspace || !PWINDOW->m_isMapped)
return;
wl_array state;
@@ -233,9 +233,9 @@ void CForeignToplevelWlrManager::onMap(PHLWINDOW pWindow) {
LOGM(LOG, "Newly mapped window {:016x}", (uintptr_t)pWindow.get());
resource->sendToplevel(NEWHANDLE->resource.get());
NEWHANDLE->resource->sendAppId(pWindow->m_szClass.c_str());
NEWHANDLE->resource->sendTitle(pWindow->m_szTitle.c_str());
if LIKELY (const auto PMONITOR = pWindow->m_pMonitor.lock(); PMONITOR)
NEWHANDLE->resource->sendAppId(pWindow->m_class.c_str());
NEWHANDLE->resource->sendTitle(pWindow->m_title.c_str());
if LIKELY (const auto PMONITOR = pWindow->m_monitor.lock(); PMONITOR)
NEWHANDLE->sendMonitor(PMONITOR);
NEWHANDLE->sendState();
NEWHANDLE->resource->sendDone();
@@ -257,7 +257,7 @@ void CForeignToplevelWlrManager::onTitle(PHLWINDOW pWindow) {
if UNLIKELY (!H || H->closed)
return;
H->resource->sendTitle(pWindow->m_szTitle.c_str());
H->resource->sendTitle(pWindow->m_title.c_str());
H->resource->sendDone();
}
@@ -269,7 +269,7 @@ void CForeignToplevelWlrManager::onClass(PHLWINDOW pWindow) {
if UNLIKELY (!H || H->closed)
return;
H->resource->sendAppId(pWindow->m_szClass.c_str());
H->resource->sendAppId(pWindow->m_class.c_str());
H->resource->sendDone();
}
@@ -294,7 +294,7 @@ void CForeignToplevelWlrManager::onMoveMonitor(PHLWINDOW pWindow) {
if UNLIKELY (!H || H->closed)
return;
const auto PMONITOR = pWindow->m_pMonitor.lock();
const auto PMONITOR = pWindow->m_monitor.lock();
if UNLIKELY (!PMONITOR)
return;