diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bdbb0da..9cc941c2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,6 @@ set(CMAKE_ENABLE_EXPORTS TRUE) message(STATUS "Checking deps...") find_package(Threads REQUIRED) - find_package(PkgConfig REQUIRED) find_package(OpenGL REQUIRED) pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1) # we do not check for wlroots, as we provide it ourselves diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 53fb7d75..31788b5d 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1074,7 +1074,7 @@ void CInputManager::setPointerConfigs() { const auto CONFIG = libinput_config_accel_create(LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM); libinput_config_accel_set_points(CONFIG, LIBINPUT_ACCEL_TYPE_MOTION, step, points.size(), points.data()); - libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM); + libinput_device_config_accel_apply(LIBINPUTDEV, CONFIG); libinput_config_accel_destroy(CONFIG); } catch (std::exception& e) { Debug::log(ERR, "Invalid values in custom accel profile"); } } else { diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 7cfe2c53..d0d1f6be 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -106,6 +106,8 @@ GLuint CHyprOpenGLImpl::compileShader(const GLuint& type, std::string src, bool void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, bool fake) { m_RenderData.pMonitor = pMonitor; + static auto* const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur:enabled")->intValue; + TRACY_GPU_ZONE("RenderBegin"); if (eglGetCurrentContext() != wlr_egl_get_context(g_pCompositor->m_sWLREGL)) { @@ -1294,7 +1296,8 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, CBox* pBox, flo // amazing hack: the surface has an opaque region! CRegion inverseOpaque; - if (a >= 1.f) { + if (a >= 1.f && std::round(pSurface->current.width * m_RenderData.pMonitor->scale) == pBox->w && + std::round(pSurface->current.height * m_RenderData.pMonitor->scale) == pBox->h) { pixman_box32_t surfbox = {0, 0, pSurface->current.width * pSurface->current.scale, pSurface->current.height * pSurface->current.scale}; inverseOpaque = &pSurface->current.opaque; inverseOpaque.invert(&surfbox).intersect(0, 0, pSurface->current.width * pSurface->current.scale, pSurface->current.height * pSurface->current.scale); diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 8c412302..f93fe78a 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -27,8 +27,7 @@ inline const float fullVerts[] = { }; inline const float fanVertsFull[] = {-1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f}; -enum eDiscardMode -{ +enum eDiscardMode { DISCARD_OPAQUE = 1, DISCARD_ALPHA = 1 << 1 }; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 6e63c9a0..dc45439b 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -189,6 +189,9 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp if (w->m_bIsFullscreen || w->m_bIsFloating) continue; + if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL); } @@ -203,9 +206,16 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp if (w->m_bIsFullscreen || !w->m_bIsFloating) continue; + if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + + if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID) + continue; // special on another are rendered as a part of the base pass + renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL); } + // TODO: this pass sucks for (auto& w : g_pCompositor->m_vWindows) { const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID); @@ -217,7 +227,7 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp continue; } - if (w->m_iWorkspaceID == pMonitor->activeWorkspace && !w->m_bIsFullscreen) + if (w->m_iWorkspaceID != pMonitor->activeWorkspace || !w->m_bIsFullscreen) continue; renderWindow(w.get(), pMonitor, time, pWorkspace->m_efFullscreenMode != FULLSCREEN_FULL, RENDER_PASS_ALL); @@ -236,6 +246,12 @@ void CHyprRenderer::renderWorkspaceWindowsFullscreen(CMonitor* pMonitor, CWorksp if (w->m_iWorkspaceID != pWorkspaceWindow->m_iWorkspaceID || (!w->m_bCreatedOverFullscreen && !w->m_bPinned) || (!w->m_bIsMapped && !w->m_bFadingOut) || w->m_bIsFullscreen) continue; + if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + + if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID) + continue; // special on another are rendered as a part of the base pass + renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL); } @@ -274,6 +290,8 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace)) continue; + if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + // render active window after all others of this pass if (w.get() == g_pCompositor->m_pLastWindow && w->m_iWorkspaceID == pWorkspace->m_iID) { lastWindow = w.get(); @@ -298,7 +316,7 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork if (g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) continue; // special are in the third pass - if (w->m_iMonitorID == pWorkspace->m_iMonitorID && g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID) && !pWorkspace->m_bIsSpecialWorkspace) + if (pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) continue; if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace)) @@ -319,6 +337,12 @@ void CHyprRenderer::renderWorkspaceWindows(CMonitor* pMonitor, CWorkspace* pWork if (!shouldRenderWindow(w.get(), pMonitor, pWorkspace)) continue; + if (w->m_iMonitorID == pWorkspace->m_iMonitorID && pWorkspace->m_bIsSpecialWorkspace != g_pCompositor->isWorkspaceSpecial(w->m_iWorkspaceID)) + continue; + + if (pWorkspace->m_bIsSpecialWorkspace && w->m_iMonitorID != pWorkspace->m_iMonitorID) + continue; // special on another are rendered as a part of the base pass + // render the bad boy renderWindow(w.get(), pMonitor, time, true, RENDER_PASS_ALL); } diff --git a/subprojects/tracy b/subprojects/tracy index 37aff70d..116e82de 160000 --- a/subprojects/tracy +++ b/subprojects/tracy @@ -1 +1 @@ -Subproject commit 37aff70dfa50cf6307b3fee6074d627dc2929143 +Subproject commit 116e82de9ebbf3937b066a3be23b8d8de16b2a0a