summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Internal: move to Mat3x3 from hyprutils (#7902)Vaxry2024-09-251-21/+0
| | | | | | | | | * Meson: require hyprutils >= 0.2.3 * flake.lock: update hyprutils --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-6/+6
| | | now we roll loops at blazing constified speed.
* build: fix 32bit builds (#7510)Tom Englund2024-08-261-5/+5
| | | | | | | ensure the correct type is passed to std::clamp and std::max int64_t is different on 64bit compared to 32bit, also in presentationtime tv_sec is __time_t and on 32bit its a 32bit type so right shift count >= width of type. so only bit shift on 64bit. and avoid potential nullptr deref in the for loops, check for .end() before *it <= endID.
* helpers: fix: revert to signed arithmetic for cycling through workspaces (#7339)Mirkwood2024-08-151-4/+4
| | | | The code clearly expects signed types there. Fixes #7329
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-39/+39
| | | | | | | | | | | | | | | | | | | | 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
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-0/+3
| | | | | | | | | | | | | | 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>
* style: fix clang-formatVaxry2024-07-131-6/+2
|
* core: add ability to select previous workspace per monitor (#6598)Alexander2024-06-221-45/+45
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: Move to hyprutils for MathVaxry2024-06-191-1/+1
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* misc: Fix build warnings (#6486)phonetic1122024-06-131-3/+4
|
* helpers: make shm_open() portable after 8bcccf9f0f0f (#6471)Jan Beich2024-06-131-1/+2
| | | | | https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html https://man.freebsd.org/shm_open/2 https://www.man7.org/linux/man-pages/man3/shm_open.3.html
* core: move to hyprutils for utils (#6385)Vaxry2024-06-111-56/+5
| | | | | | | | | | | | | * 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>
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-27/+39
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* debug: Add ARM GPU info (#6212)System642024-05-231-0/+2
| | | Added a simple way to get basic info about the GPU on ARM based systems
* keybinds: fix empty on monitor for new workspaces (#6089)JManch2024-05-151-5/+13
|
* keybinds: add empty on monitor and next empty flags (#5936)William Gray2024-05-081-2/+10
| | | | | | | | | * empty on monitor * add flag for next empty * clang-format changes * next also uses m_pLastMonitor
* config: add absolute monitor workspace selectors (#5848)William Gray2024-05-031-97/+132
| | | | | | | * add absolute monitor workspace selectors * implement absolute for `r` * format code
* ime-v2: move to new implVaxry2024-05-011-0/+35
|
* workspace: Fix duplication of "special:" in special workspace name (#5729)Agent00Ming2024-04-241-2/+2
| | | | | | | | | | | | | | * Fix duplication of "special:" in special workspace name modified: src/desktop/Workspace.cpp * Track default special workspace name as special:special This is to fix the edge cases with the previous commit without breaking user configs. modified: src/helpers/MiscFunctions.cpp --------- Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-9/+11
| | | | | * refactor workspaces to use ptrs * clang-format
* format: make ci happyVaxry2024-03-081-2/+2
|
* windowrules: Make min/maxsize rules dynamic (#4775)Epilepsy Gatherings2024-03-081-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rebase * simplify and remove prop * Stuff - add back win prop - change minsize defaults - change request formatting for setprop * style fix * remove empty line * change defaults * redo string to vec * remove redundant parsing * change to vec * support commas * remove static rules * take out garbage * format * don't allow commas and resize on setprop * use isNumber
* core: improve cleanup logicvaxerski2024-01-191-0/+7
|
* systemd: add HYPRLAND_NO_SD_NOTIFYvaxerski2023-12-211-0/+7
| | | | fixes #4217
* internal: convert uname fields to strings before loggingVaxry2023-12-181-4/+4
| | | | fixes #4188, thanks @jbeich
* screencopy: fix shm exports with 10-bitVaxry2023-12-011-0/+10
| | | | fixes #4019
* env: add HYPRLAND_NO_RTVaxry2023-11-171-0/+4
|
* internal: make getPlusMinusKeywordResult return optionalVaxry2023-11-121-7/+22
|
* internal: replace INT_MAX with WORKSPACE_INVALIDVaxry2023-11-121-9/+7
|
* compositor: find windows in direction on floatingVaxry2023-11-051-0/+4
|
* Internal: Hyprland box implementation (#3755)Vaxry2023-11-041-7/+0
| | | | | | | * box impl * remove unused operators * missed applyfromwlr
* renderer: fix legacy_renderer build (#3732)pastalian2023-11-031-1/+6
| | | | In GLES2, `GL_RGB10_A2` and `GL_UNSIGNED_INT_2_10_10_10_REV` are defined as `GL_RGB10_A2_EXT` and `GL_UNSIGNED_INT_2_10_10_10_REV_EXT` respectively.
* renderer: properly pass 10-bit formats to openglVaxry2023-10-301-0/+12
|
* workspacerules: Add new optional "default command" for auto-launching apps ↵Brenno Lemos2023-10-221-2/+40
| | | | on new workspaces (#3559)
* cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() ↵Philip Damianik2023-10-151-14/+14
| | | | | | | (#3572) * Replace find() with C++20 starts_with() and ends_with() * Replace find() with C++20 contains()
* build: guard execinfo.h via build systems (#3547)Vaxry2023-10-111-3/+9
| | | | | | | | | | | | | * guard execinfo via cmake * libexecinfo -> execinfo macro name * meson: add execinfo check * move check in cmake up --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
* logging/format: use std::format_string to catch formatting string errors at ↵memchr2023-09-201-5/+1
| | | | | | | compile time (#3377) * fix(log): use constexpr format string * deprecate getFormat
* config: fix relative path resolution (#3308)memchr2023-09-141-11/+13
|
* internal: fix warningsvaxerski2023-09-071-3/+3
|
* internal: Remove all `.c_str()` calls when using `std::vformat` (#3198)Philip Damianik2023-09-061-6/+6
| | | Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com>
* internal: Formatter rework (#3186)Vaxry2023-09-061-25/+15
|
* compositor: log thrown runtime exceptionsvaxerski2023-08-201-0/+5
|
* internal: move backtrace to specific funcvaxerski2023-08-111-0/+18
|
* config: minor path handling fixesvaxerski2023-07-101-2/+2
|
* bug fix (#2314)Eric_Luo2023-05-161-1/+1
| | | | | fix float check logic Co-authored-by: hnboy <hnywolf@gmail.ccom>
* Add "next on monitor or empty" workspace parameter (#2198)scorpion-262023-05-081-2/+135
| | | | | | | | | | | | | | | | | | | | | * Add "next on monitor or empty" workspace parameter Implements the following workspace parameter: r+x/r-x (i.e. r+1): Behaves similar to the "m" parameter, but can also select empty workspaces and it doesn't wrap around * Improve code comments * Implementation V2 for 'r' workspace param * Rebase to upstream Should fix CI * Always set outName * Include named workspaces Currently only considers open/active named workspaces
* Format: use %lx for all addressesvaxerski2023-04-171-1/+1
|
* Misc FreeBSD fixes (#1926)Jan Beich2023-03-311-3/+3
| | | | | | | | | | | | | | | | | | | | | * helpers: drop incomplete GNU/kFreeBSD bits Debian with FreeBSD kernel lacks Wayland-related packages and is not officially supported since Jessie. * KeybindManager: check VT ioctl availability instead of hardcoding * plugins: add missing header for libc++ after 430778293e4c src/plugins/PluginAPI.cpp:299:33: error: implicit instantiation of undefined template 'std::basic_istringstream<char>' std::istringstream inStream(SYMBOLS); ^ /usr/include/c++/v1/iosfwd:140:32: note: template is declared here class _LIBCPP_TEMPLATE_VIS basic_istringstream; ^ * plugins: prefer llvm-nm with Clang after 430778293e4c nm: invalid option -- j
* dispatchers: remember named workspaces in prevvaxerski2023-03-131-3/+3
|
* Buffer overflow fix (#1707)opsu2023-03-051-2/+2
|