mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-16 23:16:01 +00:00
config: add 'force' option for 'cursor:warp_on_change_workspace' (#8681)
* config: add 'force' option for 'cursor:warp_on_change_workspace' * manager: throw the expression into the function arguments * config: fix description of `cursor:warp_on_change_workspace`
This commit is contained in:
@@ -1202,12 +1202,12 @@ SDispatchResult CKeybindManager::changeworkspace(std::string args) {
|
||||
|
||||
const static auto PWARPONWORKSPACECHANGE = CConfigValue<Hyprlang::INT>("cursor:warp_on_change_workspace");
|
||||
|
||||
if (*PWARPONWORKSPACECHANGE) {
|
||||
if (*PWARPONWORKSPACECHANGE > 0) {
|
||||
auto PLAST = pWorkspaceToChangeTo->getLastFocusedWindow();
|
||||
auto HLSurface = CWLSurface::fromResource(g_pSeatManager->state.pointerFocus.lock());
|
||||
|
||||
if (PLAST && (!HLSurface || HLSurface->getWindow()))
|
||||
PLAST->warpCursor();
|
||||
PLAST->warpCursor(*PWARPONWORKSPACECHANGE == 2);
|
||||
}
|
||||
|
||||
return {};
|
||||
|
Reference in New Issue
Block a user