diff --git a/borders-plus-plus/main.cpp b/borders-plus-plus/main.cpp index 2f36e19..842df3f 100644 --- a/borders-plus-plus/main.cpp +++ b/borders-plus-plus/main.cpp @@ -47,7 +47,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { static auto P = HyprlandAPI::registerCallbackDynamic(PHANDLE, "openWindow", [&](void* self, SCallbackInfo& info, std::any data) { onNewWindow(self, data); }); // add deco to existing windows - for (auto& w : g_pCompositor->m_vWindows) { + for (auto& w : g_pCompositor->m_windows) { if (w->isHidden() || !w->m_bIsMapped) continue; diff --git a/csgo-vulkan-fix/main.cpp b/csgo-vulkan-fix/main.cpp index 402b57f..244708e 100644 --- a/csgo-vulkan-fix/main.cpp +++ b/csgo-vulkan-fix/main.cpp @@ -32,10 +32,10 @@ void hkNotifyMotion(CSeatManager* thisptr, uint32_t time_msec, const Vector2D& l Vector2D newCoords = local; - if (**PFIX && !g_pCompositor->m_pLastWindow.expired() && g_pCompositor->m_pLastWindow->m_szInitialClass == *PCLASS && g_pCompositor->m_pLastMonitor) { + if (**PFIX && !g_pCompositor->m_lastWindow.expired() && g_pCompositor->m_lastWindow->m_szInitialClass == *PCLASS && g_pCompositor->m_lastMonitor) { // fix the coords - newCoords.x *= (**RESX / g_pCompositor->m_pLastMonitor->vecSize.x) / g_pCompositor->m_pLastWindow->m_fX11SurfaceScaledBy; - newCoords.y *= (**RESY / g_pCompositor->m_pLastMonitor->vecSize.y) / g_pCompositor->m_pLastWindow->m_fX11SurfaceScaledBy; + newCoords.x *= (**RESX / g_pCompositor->m_lastMonitor->vecSize.x) / g_pCompositor->m_lastWindow->m_fX11SurfaceScaledBy; + newCoords.y *= (**RESY / g_pCompositor->m_lastMonitor->vecSize.y) / g_pCompositor->m_lastWindow->m_fX11SurfaceScaledBy; } (*(origMotion)g_pMouseMotionHook->m_pOriginal)(thisptr, time_msec, newCoords); diff --git a/flake.lock b/flake.lock index 725aed8..af41172 100644 --- a/flake.lock +++ b/flake.lock @@ -116,11 +116,11 @@ ] }, "locked": { - "lastModified": 1743953322, - "narHash": "sha256-prQ5JKopXtzCMX2eT3dXbaVvGmzjMRE2bXStQDdazpM=", + "lastModified": 1745015490, + "narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "9d7f2687c84c729afbc3b13f7937655570f2978d", + "rev": "60754910946b4e2dc1377b967b7156cb989c5873", "type": "github" }, "original": { @@ -145,11 +145,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1744921985, - "narHash": "sha256-to3lo8FYzHl4Z0O30wHprOZHUQdKYvAecWyX+zdoEEY=", + "lastModified": 1745328209, + "narHash": "sha256-eP3x+JNE1T6RjXhimaEnoc4GvNJcyzppW1vpAs287Zg=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "ddae3036ca6a1729ffe7854a59184116d2622809", + "rev": "241a4935a244f403fa7108259075b04c81ed258f", "type": "github" }, "original": { @@ -332,11 +332,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744463964, - "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index d62f01c..6aacd8f 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -83,7 +83,7 @@ bool CHyprBar::inputIsValid() { const auto WINDOWATCURSOR = g_pCompositor->vectorToWindowUnified(g_pInputManager->getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING); - if (WINDOWATCURSOR != m_pWindow && m_pWindow != g_pCompositor->m_pLastWindow) + if (WINDOWATCURSOR != m_pWindow && m_pWindow != g_pCompositor->m_lastWindow) return false; return true; @@ -106,7 +106,7 @@ void CHyprBar::onTouchDown(SCallbackInfo& info, ITouch::SDownEvent e) { return; auto PMONITOR = g_pCompositor->getMonitorFromName(!e.device->boundOutput.empty() ? e.device->boundOutput : ""); - PMONITOR = PMONITOR ? PMONITOR : g_pCompositor->m_pLastMonitor.lock(); + PMONITOR = PMONITOR ? PMONITOR : g_pCompositor->m_lastMonitor.lock(); g_pCompositor->warpCursorTo({PMONITOR->vecPosition.x + e.pos.x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e.pos.y * PMONITOR->vecSize.y}, true); handleDownEvent(info, e); @@ -165,7 +165,7 @@ void CHyprBar::handleDownEvent(SCallbackInfo& info, std::optionalm_pLastWindow.lock() != PWINDOW) + if (g_pCompositor->m_lastWindow.lock() != PWINDOW) g_pCompositor->focusWindow(PWINDOW); if (PWINDOW->m_bIsFloating) @@ -179,7 +179,7 @@ void CHyprBar::handleDownEvent(SCallbackInfo& info, std::optionalm_pLastWindow.lock()) + if (m_pWindow.lock() != g_pCompositor->m_lastWindow.lock()) return; if (m_bCancelledDown) diff --git a/hyprbars/main.cpp b/hyprbars/main.cpp index ee2d9bc..3f61bc3 100644 --- a/hyprbars/main.cpp +++ b/hyprbars/main.cpp @@ -146,7 +146,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { static auto P4 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "preConfigReload", [&](void* self, SCallbackInfo& info, std::any data) { onPreConfigReload(); }); // add deco to existing windows - for (auto& w : g_pCompositor->m_vWindows) { + for (auto& w : g_pCompositor->m_windows) { if (w->isHidden() || !w->m_bIsMapped) continue; @@ -161,7 +161,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { } APICALL EXPORT void PLUGIN_EXIT() { - for (auto& m : g_pCompositor->m_vMonitors) + for (auto& m : g_pCompositor->m_monitors) m->scheduledRecalc = true; g_pHyprRenderer->m_sRenderPass.removeAllOfType("CBarPassElement"); diff --git a/hyprexpo/main.cpp b/hyprexpo/main.cpp index 280d9cb..73844cb 100644 --- a/hyprexpo/main.cpp +++ b/hyprexpo/main.cpp @@ -91,7 +91,7 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) { if (!swipeActive) { if (g_pOverview && (**PPOSITIVE ? 1.0 : -1.0) * e.delta.y <= 0) { renderingOverview = true; - g_pOverview = std::make_unique(g_pCompositor->m_pLastMonitor->activeWorkspace, true); + g_pOverview = std::make_unique(g_pCompositor->m_lastMonitor->activeWorkspace, true); renderingOverview = false; gestured = **PDISTANCE; swipeActive = true; @@ -99,7 +99,7 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) { else if (!g_pOverview && (**PPOSITIVE ? 1.0 : -1.0) * e.delta.y > 0) { renderingOverview = true; - g_pOverview = std::make_unique(g_pCompositor->m_pLastMonitor->activeWorkspace, true); + g_pOverview = std::make_unique(g_pCompositor->m_lastMonitor->activeWorkspace, true); renderingOverview = false; gestured = 0; swipeActive = true; @@ -135,7 +135,7 @@ static void onExpoDispatcher(std::string arg) { g_pOverview->close(); else { renderingOverview = true; - g_pOverview = std::make_unique(g_pCompositor->m_pLastMonitor->activeWorkspace); + g_pOverview = std::make_unique(g_pCompositor->m_lastMonitor->activeWorkspace); renderingOverview = false; } return; @@ -151,7 +151,7 @@ static void onExpoDispatcher(std::string arg) { return; renderingOverview = true; - g_pOverview = std::make_unique(g_pCompositor->m_pLastMonitor->activeWorkspace); + g_pOverview = std::make_unique(g_pCompositor->m_lastMonitor->activeWorkspace); renderingOverview = false; } diff --git a/hyprexpo/overview.cpp b/hyprexpo/overview.cpp index e436cce..8d2666d 100644 --- a/hyprexpo/overview.cpp +++ b/hyprexpo/overview.cpp @@ -27,7 +27,7 @@ COverview::~COverview() { } COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn_), swipe(swipe_) { - const auto PMONITOR = g_pCompositor->m_pLastMonitor.lock(); + const auto PMONITOR = g_pCompositor->m_lastMonitor.lock(); pMonitor = PMONITOR; static auto* const* PCOLUMNS = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:columns")->getDataStaticPtr(); diff --git a/hyprtrails/main.cpp b/hyprtrails/main.cpp index 4746153..4acc3aa 100644 --- a/hyprtrails/main.cpp +++ b/hyprtrails/main.cpp @@ -121,7 +121,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { initGlobal(); // add deco to existing windows - for (auto& w : g_pCompositor->m_vWindows) { + for (auto& w : g_pCompositor->m_windows) { if (w->isHidden() || !w->m_bIsMapped) continue; diff --git a/xtra-dispatchers/main.cpp b/xtra-dispatchers/main.cpp index dd12ed4..b3c11a4 100644 --- a/xtra-dispatchers/main.cpp +++ b/xtra-dispatchers/main.cpp @@ -28,7 +28,7 @@ APICALL EXPORT std::string PLUGIN_API_VERSION() { static SDispatchResult moveOrExec(std::string in) { CVarList vars(in, 0, ','); - if (!g_pCompositor->m_pLastMonitor || !g_pCompositor->m_pLastMonitor->activeWorkspace) + if (!g_pCompositor->m_lastMonitor || !g_pCompositor->m_lastMonitor->activeWorkspace) return SDispatchResult{.success = false, .error = "No active workspace"}; const auto PWINDOW = g_pCompositor->getWindowByRegex(vars[0]); @@ -36,8 +36,8 @@ static SDispatchResult moveOrExec(std::string in) { if (!PWINDOW) g_pKeybindManager->spawn(vars[1]); else { - if (g_pCompositor->m_pLastMonitor->activeWorkspace != PWINDOW->m_pWorkspace) - g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->m_pLastMonitor->activeWorkspace); + if (g_pCompositor->m_lastMonitor->activeWorkspace != PWINDOW->m_pWorkspace) + g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->m_lastMonitor->activeWorkspace); else g_pCompositor->warpCursorTo(PWINDOW->middle()); g_pCompositor->focusWindow(PWINDOW); @@ -52,15 +52,15 @@ static SDispatchResult throwUnfocused(std::string in) { if (id == WORKSPACE_INVALID) return SDispatchResult{.success = false, .error = "Failed to find workspace"}; - if (!g_pCompositor->m_pLastWindow || !g_pCompositor->m_pLastWindow->m_pWorkspace) + if (!g_pCompositor->m_lastWindow || !g_pCompositor->m_lastWindow->m_pWorkspace) return SDispatchResult{.success = false, .error = "No valid last window"}; auto pWorkspace = g_pCompositor->getWorkspaceByID(id); if (!pWorkspace) - pWorkspace = g_pCompositor->createNewWorkspace(id, g_pCompositor->m_pLastWindow->m_pWorkspace->monitorID(), name, false); + pWorkspace = g_pCompositor->createNewWorkspace(id, g_pCompositor->m_lastWindow->m_pWorkspace->monitorID(), name, false); - for (const auto& w : g_pCompositor->m_vWindows) { - if (w == g_pCompositor->m_pLastWindow || w->m_pWorkspace != g_pCompositor->m_pLastWindow->m_pWorkspace) + for (const auto& w : g_pCompositor->m_windows) { + if (w == g_pCompositor->m_lastWindow || w->m_pWorkspace != g_pCompositor->m_lastWindow->m_pWorkspace) continue; g_pCompositor->moveWindowToWorkspaceSafe(w, pWorkspace); @@ -75,20 +75,20 @@ static SDispatchResult bringAllFrom(std::string in) { if (id == WORKSPACE_INVALID) return SDispatchResult{.success = false, .error = "Failed to find workspace"}; - if (!g_pCompositor->m_pLastMonitor || !g_pCompositor->m_pLastMonitor->activeWorkspace) + if (!g_pCompositor->m_lastMonitor || !g_pCompositor->m_lastMonitor->activeWorkspace) return SDispatchResult{.success = false, .error = "No active monitor"}; auto pWorkspace = g_pCompositor->getWorkspaceByID(id); if (!pWorkspace) return SDispatchResult{.success = false, .error = "Workspace isnt open"}; - const auto PLASTWINDOW = g_pCompositor->m_pLastWindow.lock(); + const auto PLASTWINDOW = g_pCompositor->m_lastWindow.lock(); - for (const auto& w : g_pCompositor->m_vWindows) { + for (const auto& w : g_pCompositor->m_windows) { if (w->m_pWorkspace != pWorkspace) continue; - g_pCompositor->moveWindowToWorkspaceSafe(w, g_pCompositor->m_pLastMonitor->activeWorkspace); + g_pCompositor->moveWindowToWorkspaceSafe(w, g_pCompositor->m_lastMonitor->activeWorkspace); } if (PLASTWINDOW) { @@ -100,11 +100,11 @@ static SDispatchResult bringAllFrom(std::string in) { } static SDispatchResult closeUnfocused(std::string in) { - if (!g_pCompositor->m_pLastMonitor) + if (!g_pCompositor->m_lastMonitor) return SDispatchResult{.success = false, .error = "No focused monitor"}; - for (const auto& w : g_pCompositor->m_vWindows) { - if (w->m_pWorkspace != g_pCompositor->m_pLastMonitor->activeWorkspace || w->m_pMonitor != g_pCompositor->m_pLastMonitor || !w->m_bIsMapped) + for (const auto& w : g_pCompositor->m_windows) { + if (w->m_pWorkspace != g_pCompositor->m_lastMonitor->activeWorkspace || w->m_pMonitor != g_pCompositor->m_lastMonitor || !w->m_bIsMapped) continue; g_pCompositor->closeWindow(w);