From efc51eb7d1ec8377425bb7b623b54831f2c18afc Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 17 Mar 2025 09:51:18 -0500 Subject: [PATCH] managers: Use primary backend for cursor swapchain (#9645) --- CMakeLists.txt | 2 +- meson.build | 2 +- src/managers/PointerManager.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40258bbe0..c4ad4ca0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,7 @@ else() endif() find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION}) -pkg_check_modules(aquamarine_dep REQUIRED IMPORTED_TARGET aquamarine>=0.4.5) +pkg_check_modules(aquamarine_dep REQUIRED IMPORTED_TARGET aquamarine>=0.8.0) pkg_check_modules(hyprlang_dep REQUIRED IMPORTED_TARGET hyprlang>=0.3.2) pkg_check_modules(hyprcursor_dep REQUIRED IMPORTED_TARGET hyprcursor>=0.1.7) pkg_check_modules(hyprutils_dep REQUIRED IMPORTED_TARGET hyprutils>=0.5.1) diff --git a/meson.build b/meson.build index da9e78cf4..d9635a27f 100644 --- a/meson.build +++ b/meson.build @@ -31,7 +31,7 @@ if cpp_compiler.check_header('execinfo.h') add_project_arguments('-DHAS_EXECINFO', language: 'cpp') endif -aquamarine = dependency('aquamarine', version: '>=0.4.5') +aquamarine = dependency('aquamarine', version: '>=0.8.0') hyprcursor = dependency('hyprcursor', version: '>=0.1.7') hyprgraphics = dependency('hyprgraphics', version: '>= 0.1.1') hyprlang = dependency('hyprlang', version: '>= 0.3.2') diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 048719b8b..4f909714e 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -419,7 +419,9 @@ SP CPointerManager::renderHWCursorBuffer(SPmonitor->cursorSwapchain = Aquamarine::CSwapchain::create(allocator, state->monitor->output->getBackend()); + auto backend = state->monitor->output->getBackend(); + auto primary = backend->getPrimary(); + state->monitor->cursorSwapchain = Aquamarine::CSwapchain::create(allocator, primary ? primary.lock() : backend); } auto options = state->monitor->cursorSwapchain->currentOptions();