99#include < hyprland/src/render/Renderer.hpp>
1010#include < hyprland/src/managers/input/trackpad/GestureTypes.hpp>
1111#include < hyprland/src/managers/input/trackpad/TrackpadGestures.hpp>
12+ #include < hyprland/src/managers/LayoutManager.hpp>
1213
1314#include < hyprutils/string/ConstVarList.hpp>
1415using namespace Hyprutils ::String;
1516
1617#include " globals.hpp"
1718#include " overview.hpp"
19+ #include " scrollOverview.hpp"
1820#include " ExpoGesture.hpp"
1921
2022// Methods
@@ -66,6 +68,8 @@ static void hkAddDamageB(void* thisptr, const pixman_region32_t* rg) {
6668
6769static SDispatchResult onExpoDispatcher (std::string arg) {
6870
71+ IS_SCROLLING = g_pLayoutManager->getCurrentLayout ()->getLayoutName () == " scrolling" ;
72+
6973 if (g_pOverview && g_pOverview->m_isSwiping )
7074 return {.success = false , .error = " already swiping" };
7175
@@ -81,7 +85,10 @@ static SDispatchResult onExpoDispatcher(std::string arg) {
8185 g_pOverview->close ();
8286 else {
8387 renderingOverview = true ;
84- g_pOverview = std::make_unique<COverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
88+ if (IS_SCROLLING)
89+ g_pOverview = makeShared<CScrollOverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
90+ else
91+ makeShared<COverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
8592 renderingOverview = false ;
8693 }
8794 return {};
@@ -97,7 +104,10 @@ static SDispatchResult onExpoDispatcher(std::string arg) {
97104 return {};
98105
99106 renderingOverview = true ;
100- g_pOverview = std::make_unique<COverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
107+ if (IS_SCROLLING)
108+ g_pOverview = makeShared<CScrollOverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
109+ else
110+ makeShared<COverview>(g_pCompositor->m_lastMonitor ->m_activeWorkspace );
101111 renderingOverview = false ;
102112 return {};
103113}
@@ -107,7 +117,7 @@ static void failNotif(const std::string& reason) {
107117}
108118
109119static Hyprlang::CParseResult expoGestureKeyword (const char * LHS, const char * RHS) {
110- Hyprlang::CParseResult result;
120+ Hyprlang::CParseResult result;
111121
112122 if (g_unloading)
113123 return result;
0 commit comments