summaryrefslogtreecommitdiff
path: root/src/managers/CursorManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-181-6/+6
|
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-1/+1
|
* renderer: add more uniforms to the screen shader (#11986)Mozzarella322025-10-201-0/+4
| | | | | | | | | | | | These are: pointer_shape from the cursor-shape-v1 protocol prepared for v2, along with left_ptr...bottom_right_corner and killing (Hyprland specific) pointer_shape_previous with pointer_switch_time to blend between shapes pointer_size scaled size as used by the normal cursor pointer_pressed_positions[32] with pointer_pressed_times[32] and pointer_pressed_killed(32 bits) for click/touch animations and if they killed something pointer_inactive_timeout with pointer_last_active to smoothly fade the pointer out pointer_hidden to hide it when the cursor is hidden (excluding by cursor:invisible as this config value can be used to turn off the normal cursor, which is useful when drawing it with the screen shader)
* refactor: Use new hyprutils casts (#11377)Kamikadze2025-08-141-8/+8
|
* cursor: reset hc data after theme changeVaxry2025-06-151-1/+2
| | | | | | theme change invalidates the cairo surfaces there fixes #10636
* internal: refactor to use empty() (#10599)Kamikadze2025-05-311-4/+4
|
* refactor: use std::ranges whenever possible (#10584)Kamikadze2025-05-301-1/+1
|
* managers: refactor class member vars (#10242)davc0n2025-05-021-81/+80
|
* helpers: refactor class member vars (#10218)davc0n2025-04-301-3/+3
|
* compositor: refactor class member vars (#10141)davc0n2025-04-221-2/+2
|
* windowrules: allow incrementing window props (#9566)MightyPlaza2025-04-161-0/+1
|
* CursorManager: Store cursor pixel data retrieved from X/HC as a copy (#9986)Vaxry2025-04-071-4/+8
| | | Instead of storing pointers as refs (which could randomly get invalid very easily) copy the data.
* internal: Don't force default cursor on config reload/monitor reconfigure ↵X2E4VXpZKv2025-04-011-2/+0
| | | | (#9815)
* core: move all shared_ptrs from the STL to hyprutils (#9143)Vaxry2025-01-231-3/+3
|
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+1
| | | Cleanup some unneeded includes to speed up compilation
* core: Add clang-tidy (#8664)Vaxry2024-12-071-8/+4
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-191-1/+1
| | | | | * move monitors to sp * XD
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-3/+3
| | | now we roll loops at blazing constified speed.
* xcursormgr: dont apply scale on gsettings (#7316)Tom Englund2024-08-161-5/+5
| | | | | gtk scales the cursor size itself since its CSD so if we scale the size its gonna get double scaled. incorporate the scale into xcursormanager to keep track of it.
* cursormgr: fix cursor gsettings on session change (#7295)Ikalco2024-08-131-1/+5
|
* cursormgr: implement inheriting themes for xcursor (#7197)Tom Englund2024-08-071-172/+173
| | | | | | | | | | | | | | | | | | | * cursormgr: reduce duplicated code add a few functions such as setCursorBuffer and setAnimationTimer to reduce duplicated code and also avoid future mishaps of forgetting to clear buffer or disarm timer. and generally reduce spaghetti even tho pasta can be delicious. * xcursormgr: implent inherited themes implent index.theme parsing and inherited themes. * cursormgr: ensure a fallback xcursor exist ensure a xcursor fallback exist otherwise it wont load the proper theme if we at launch have hyprcursor enabled and then set it to false in config and reload. also use the env var when using hyprctl setcursor incase its empty.
* cursor: Better xcursor implementation (#7178)Tom Englund2024-08-051-386/+86
| | | | | | | | | | | | | | | | | | * xcursor: bootleg xcursors into its own manager implent XCursorManager and load themes based on librarypath and its dir, now we catch all supplied theme files. and also implent animated cursors. also refactor a bit of spaghetti regarding xcursors in CursorManager. * hyprcursor: fix buffer leak animated cursors are creating a new buffer for each image, ensure we drop the buffers so it continously doesnt build up in infinity. * cursormgr: use eventloopmgr for animation use EvenloopManager for timers instead of adding it directly to m_sWLEventLoop and using its related wl_* functions.
* xcursor: rework bootleg xcursor (#7140)Tom Englund2024-08-021-92/+273
| | | | | | there were a bunch of missing cursors, rework the shape loading add a function to get legacyname from new wayland names. also bootleg add a cursor if no theme can be found and no shape. to atleast show something.
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-92/+211
| | | | | | | | | | | | | | Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
* core: Move to hyprutils for MathVaxry2024-06-191-4/+5
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-2/+2
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* core: free more memory on destruction (#6348)Tom Englund2024-06-061-0/+3
| | | | | | | | | | | | | | | | | | * pointermgr: add destructor to state and free buf if the pointer has a buffer set it wont be freed upon destruction, make asan more happy by adding a destructor and wlr_buf_unlock it on exit. * cursormgr: free the animation timer event source properly free the animation timer event source on destruction. * compositor: free the critsig event source on exit properly free the critical signal event source on exit. * popup: clang format style clang format.
* hyprctl: Make setcursor better (support XCursor themes, give fail message) ↵Ikalco2024-05-281-9/+45
| | | | | | | | | (#6097) * add support for changing to X cursor themes * use new hyprcursor abi for options * remove unneeded struct
* xwayland: move to hyprland impl (#6086)Vaxry2024-05-251-5/+6
|
* config: move various cursor-related vars to cursor:Vaxry2024-05-091-1/+1
|
* cursor: move to a hyprland implVaxry2024-05-091-17/+58
| | | | | | | This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
* internal: fix a few asan reported leaks on exit of hyprland (#5852)Tom Englund2024-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * notifications: free cairo images on destruction asan reports a leak on exit if we dont free the image we created in the draw function. add a destructor and free images on exit. * compositor: destroy wlroots types on exit there are a few types not being destroyed on exit and causing a leak on exit in wlroots reported by asan, add those. * cursormgr: ensure we destroy cursor mgr on exit add a destructor and call wlr_xcursor_manager_destroy on the manager on destruction, leak reported by asan. * keybindmgr: free state and keymap add missing keymap_unref on creation, and add a destructor and free the state on exit. leak reported by asan. * skeyboard: add destructor and free state free the state on destruction of keyboard, reported as leak by asan
* cursor-shape: use - instead of _ in shapesVaxry2024-05-021-3/+3
| | | | ref #5824
* cursormgr: attempt using - instead of _ for failed cursors before fallbackVaxry2024-05-021-0/+8
| | | | web uses -, and thus some themes might use - too. Attempt replacing _ with - before assuming a shape is missing.
* cursormgr: fix misscaled cursors on fractionalVaxry2024-04-241-2/+4
|
* HookSystem: improve callback safetyVaxry2024-04-201-1/+1
|
* cursor: add hyprcursor loggersVaxry2024-04-151-2/+9
|
* cursor: Fallback to xcursor if failed to render hyprcursor (#5534)SoSeDiK2024-04-101-0/+1
|
* cursormgr: don't set x theme in changeThemeVaxry2024-03-241-3/+0
|
* cursormgr: log theme loading failuresVaxry2024-03-241-0/+6
|
* cursormgr: scale hotspot with bufferVaxry2024-03-171-4/+4
|
* cursormgr: use XCURSOR_THEME for x themesVaxry2024-03-111-1/+1
|
* cursormgr: fix invalid access to hyprcursor in xwayland initVaxry2024-03-091-0/+16
| | | | fixes #5048
* cursormgr: fix memory leak with cursor buffersVaxry2024-03-091-1/+4
|
* cursormgr: add fallbacks for unknown cursorsVaxry2024-03-091-2/+14
|
* internal: Support libhyprcursor (#5009)Vaxry2024-03-091-0/+200
woo --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>