summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-37/+37
| | | | | | | | | | | | | | | | | | | | overflow (#7216) * framebuffer: avoid gluint overflow GLuint was being initialized to -1 and rolling over to unsigned int max, its defined behaviour but very unnecessery. add a bool and use it for checking if allocated or not. * opengl: avoid gluint rollover -1 rolls over to unsigned int max, use 0xFF instead. * core: big uint64_t to int type conversion there were a few uint64_t to int implicit conversions overflowing int and causing UB, make all monitor/workspaces/windows use the new typedefs. also fix the various related 64 to 32 implicit conversions going around found with -Wshorten-64-to-32
* compositor: fix general:extend_border_grab_area (#7214)Agent00Ming2024-08-071-2/+2
| | | Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
* compositor: minor cleanups for fading out layersVaxry2024-08-071-2/+9
|
* renderer: Explicit sync fixes (#7151)Vaxry2024-08-061-2/+2
| | | | | Enables explicit sync by default for most platforms `misc:no_direct_scanout` -> `render:direct_scanout`
* core: Add missing header for libc++ after e989a0bcffac (#7158)Jan Beich2024-08-031-0/+1
| | | | | | | | | | | src/Compositor.cpp:2295:74: error: no member named 'bit_floor' in namespace 'std' 2295 | const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal); | ~~~~~^ src/Compositor.cpp:2296:74: error: no member named 'bit_floor' in namespace 'std' 2296 | const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal); | ~~~~~^ src/desktop/Window.cpp:1242:34: error: no member named 'bit_floor' in namespace 'std' 1242 | return (eFullscreenMode)std::bit_floor((uint8_t)m_sFullscreenState.internal) == MODE; | ~~~~~^
* layout: fix dynamic rules not updating after setting fullscreen (#7129)Sungyoon Cho2024-08-011-1/+2
|
* internal: some minor fd/socket cleanups and make logging thread safe (#7123)Tom Englund2024-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bezier: dont loop on float values Using a floating-point loop variable with a fixed increment can cause precision errors over time due to the nature of floating-point arithmetic. and cause undesired effects. ex iteration 1 = 0.10000000149011611938 iteration 2 = 0.20000000298023223877 eventually.. iteration 8 = 0.80000001192092895508 iteration 9 = 0.89999997615814208984 * hyprctl: close sockets on destruction store socketpath and close the fd and unlink the socket path on exit. * eventloopmgr: close the timerfd close the timerfd on exit. * debug: make logging thread safe instead of opening and closing the logfile on each write open it on init and close it on compositor exit. also add a mutex so accidently using logging from a thread like the watchdog or similiar doesnt cause issues. * xwl: clean up fd logic check if the fd is actually opened before closing, and close the pipesource FD on exit.
* internal: refactor fullscreen states (#7104)MightyPlaza2024-07-311-40/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor fullscreen modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/config/ConfigManager.cpp modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/LayerSurface.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/desktop/Workspace.cpp modified: src/desktop/Workspace.hpp modified: src/events/Windows.cpp modified: src/helpers/Monitor.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/DwindleLayout.hpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp modified: src/layout/MasterLayout.hpp modified: src/managers/KeybindManager.cpp modified: src/managers/KeybindManager.hpp modified: src/managers/input/IdleInhibitor.cpp modified: src/managers/input/InputManager.cpp modified: src/managers/input/Swipe.cpp modified: src/protocols/ForeignToplevelWlr.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * clean up modified: src/config/ConfigManager.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.hpp modified: src/desktop/Workspace.cpp modified: src/events/Windows.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/input/Swipe.cpp * fix mapWindow fullscreen modified: src/events/Windows.cpp * fix typo modified: src/desktop/Workspace.cpp * add fullscreenstate modified: src/config/ConfigManager.cpp modified: src/events/Windows.cpp * change syncFullscreen to lower modified: src/config/ConfigManager.hpp * initialize fs state modified: src/desktop/Window.hpp
* compositor: fix log typos (#7111)jim36922024-07-301-2/+2
|
* core: Properly shutdown wl display (#7018)Ikalco2024-07-241-10/+14
| | | | | | | * correctly destroy wayland globals * properly shutdown and cleanup hyprland * appease the nitpick gods and some comments
* compositor: simplify getWindowFromSurfaceVaxry2024-07-241-8/+3
|
* debug: get rid of useless 1s in logs (#6969)Ikalco2024-07-221-5/+5
| | | | | * get rid of 1s in logs lol * replace WLR with AQ in logs
* core: avoid locking 2 wayland sockets (#6971)diniamo2024-07-221-49/+20
| | | | | | | * fix: avoid locking 2 wayland sockets * format * fix formatting
* compositor: ignore setting surface scanout if DS is disabledVaxry2024-07-211-1/+5
|
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-109/+282
| | | | | | | | | | | | | | 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>
* compositor: implement wayland socket handover (#6930)Ferdinand Bachmann2024-07-201-10/+20
| | | | | | | | | | | | | * compositor: implement wayland socket handover This commit implements the compositor side of the Wayland socket handover protocol as described in the [KDE Wiki]. The CLI options are chosen so that they are compatible with Kwin. [KDE Wiki]: https://invent.kde.org/plasma/kwin/-/wikis/Restarting * main: verify that --wayland-fd is a valid file descriptor * main: fail if only one of --socket and --wayland-fd is passed
* style: fix clang-formatVaxry2024-07-131-1/+2
|
* core: Improve handling of window properties (#6776)MightyPlaza2024-07-111-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add mWindowProperties modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp * support int values modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp * create m_sWindowData modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * simplify some properties modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/managers/KeybindManager.cpp * store multiple values in CWindowOverridableVar modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * clean up modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/config/ConfigManager.cpp modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp modified: src/managers/KeybindManager.cpp * use SET_PROP priority for exec rules modified: src/config/ConfigManager.hpp modified: src/desktop/Window.cpp * add default value modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * add setprop toggle modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp * add setprop toggle modified: src/debug/HyprCtl.cpp * make window rules functional modified: src/config/ConfigManager.cpp modified: src/desktop/Window.cpp * minor fixes modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.hpp * properly clean layout data modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/IHyprLayout.hpp modified: src/layout/MasterLayout.cpp * remove newline modified: src/events/Windows.cpp * fixes modified: src/config/ConfigManager.hpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp * use CamelCase modified: src/Compositor.cpp modified: src/debug/HyprCtl.cpp modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/layout/IHyprLayout.cpp modified: src/managers/AnimationManager.cpp modified: src/managers/KeybindManager.cpp modified: src/managers/XWaylandManager.cpp modified: src/render/OpenGL.cpp modified: src/render/Renderer.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* pointer: update geometry after unplug eventsVaxry2024-07-051-2/+2
| | | | | | fixes #6700 fixes #6740
* dbus: import PATH XDG_DATA_DIRS variables into systemd and dbus sessionJohn Titor2024-06-231-4/+4
|
* core: add ability to select previous workspace per monitor (#6598)Alexander2024-06-221-2/+1
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: avoid bumping hard rlimits, restore on forkVaxry2024-06-191-32/+23
| | | | ref #6584
* core: Move to hyprutils for MathVaxry2024-06-191-2/+1
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* compositor: bump nofile rlimits on launchVaxry2024-06-181-0/+43
| | | | ref #6584
* core: fix a few small memory leaks on exit (#6470)Tom Englund2024-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | * renderer: add destructor and destroy event source add destructor and destroy the event source. one less leak on exit of compositor reported by asan. * compositor: cleanup eventloop on exit destruct hyprctl to release the event sources, and properly cleanup the event loop on exit of compositor. less leaks on exit reported by asan * threadmgr: destroy event source on destruction destroy the event source on destruction. * eventloopmgr: reset eventloopmgr on exit aswell reset the eventloopmanager on exit of compositor and free the leaking last idle frame on monitor destroy.
* layershell: minor fixes to re-mapping of layersVaxry2024-06-121-0/+4
| | | | ref #2012
* compositor: update suspended states on moveworkspacetomonitorVaxry2024-06-121-0/+2
| | | | fixes #6417
* layer: don't close special ws when restoring focus (#6424)MightyPlaza2024-06-111-0/+11
| | | | | modified: src/Compositor.cpp modified: src/Compositor.hpp modified: src/managers/input/InputManager.cpp
* core: move to hyprutils for utils (#6385)Vaxry2024-06-111-1/+4
| | | | | | | | | | | | | * core: move to hyprutils for utils Nix: add hyprutils dep * Meson: add hyprutils dep * flake.lock: update --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* input: fix input regions being ignored on ls-es (#6413)outfoxxed2024-06-111-1/+1
|
* egl: assume implicit modifiers are available for old driversVaxry2024-06-091-3/+3
| | | | fixes #6367
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-107/+75
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* core: free more memory on destruction (#6348)Tom Englund2024-06-061-1/+4
| | | | | | | | | | | | | | | | | | * 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.
* compositor: change monitor focus when no_warps is enabled (#6260)AERDU2024-05-271-1/+5
| | | fixes focus between monitors when moving using directions with no_warps = true
* xwayland: move to hyprland impl (#6086)Vaxry2024-05-251-14/+14
|
* monitor: avoid UB on undefined auto dirvaxerski2024-05-241-0/+1
| | | | ref #6217
* keybinds: Add option to disable window direction monitor fallback (#6182)shezdy2024-05-221-1/+8
| | | | | * add monitor fallback option * format
* wl-data-device: move to hyprland implVaxry2024-05-141-10/+0
|
* seatmgr: Add a grab classVaxry2024-05-141-0/+5
|
* xdg-shell: move to new implVaxry2024-05-141-24/+27
|
* wl_seat: move to hyprland implVaxry2024-05-141-53/+22
|
* core: fix on-empty workspace being called too often (#6026)Brenno Lemos2024-05-121-2/+2
|
* socket2: fix events being reordered (#5955)underengineering2024-05-101-4/+0
| | | | | | | | | | | | | | | | | | | * socket2: fix events being reordered * remove WL_EVENT_READABLE * initialize eventSource in SClient * add more logs oopsie * replace unordered_map with vector * fix reordering when socket becomes writable before queue is flushed * ignore EAGAIN when accepting connection * use g_pEventManager
* presentation-time: move to new implVaxry2024-05-101-2/+0
|
* config: move various cursor-related vars to cursor:Vaxry2024-05-091-2/+2
|
* core: drop unused protocol implsVaxry2024-05-091-6/+0
| | | | | | xdg_foreign is not used by hyprland wlr_export_dmabuf is old, broken and unused as well
* layer-shell: move to new implVaxry2024-05-091-46/+29
| | | | Also bumps the hw-s dep
* core: remove wayland sockets on exit (#5959)Ikalco2024-05-091-0/+4
|
* Tablet: move to new implVaxry2024-05-091-2/+0
| | | | Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
* cursor: move to a hyprland implVaxry2024-05-091-66/+32
| | | | | | | This moves wlr_cursor to a completely new impl mostly under CPointerManager Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)