Commit Graph

24 Commits

Author SHA1 Message Date
Zach DeCook 0bf9ceb53b
core: Include cstring whenever strncpy is used (#7267)
Fixes ppc64le build in alpine
2024-08-10 21:09:12 +01:00
Vaxry 37e1411e8d
core/surface/buffer: Buffer lock/release fixes (#7110) 2024-07-31 21:47:26 +02:00
Tom Englund 5489682799
internal: some minor fd/socket cleanups and make logging thread safe (#7123)
* 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.
2024-07-31 21:00:14 +02:00
Vaxry a9d87bd666 surface: emit unmap before unmapping and releasing the buffers 2024-07-28 23:56:35 +02:00
Vaxry 682865632f xwayland: fix high cpu idle usage
fixes #7051
2024-07-27 13:58:30 +02:00
Ikalco e8374e0792
debug: get rid of useless 1s in logs (#6969)
* get rid of 1s in logs lol

* replace WLR with AQ in logs
2024-07-22 18:06:11 +02:00
UjinT34 511e9ccdd1
xwm: Fix xwayland black window bug after losing focus (#6966)
* fix xwayland black window bug

* resend normal state
2024-07-22 13:15:40 +02:00
Vaxry cbaac6deaf xwm: drop invalid case for clearing X focus
fixes #6955
2024-07-21 20:02:48 +02:00
Vaxry f7fb7e7e49 xwayland: avoid unfocusing on OR child focuses
fixes #6698
2024-07-21 17:27:36 +02:00
Vaxry 016da234d0
Core: Move to aquamarine (#6608)
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>
2024-07-21 13:09:54 +02:00
Ikalco b03f41efec
xwayland: fix setting title prop (#6809)
* fix setting xwayland title prop

* add window title types
2024-07-08 17:46:42 +02:00
Tom Englund fa022901cf
surface: add virtual destructor to surfacerole to avoid undefined behaviour (#6620)
* surfacerole: add virtual destructor

all classes that will be derived from should have a virtual destructor
otherwise deleting an instance via pointer to a base class is undefined
behaviour, layershell/xdgshell hits this with std::default_delete in the
new sharedptr implentation.

* includes: fix missing includes

fix missing includes for no precompiled headers builds, and remove a
redefiniton of a macro already defined in macros.hpp
2024-06-22 00:40:45 +02:00
Vaxry fb15b7aa2a core: Move to hyprutils for Math
Moves CRegion, CBox and Vector2D over to hyprutils.

Requires hyprutils>=0.1.4
2024-06-19 16:20:15 +02:00
Vaxry b15be9c77d xwayland: do not set a new data source if it has no MIMEs
ref #6247
2024-06-16 21:34:17 +02:00
Vaxry 069a21a34e xwayland: force default plain mime atoms on known types
ref #6247
2024-06-16 19:52:07 +02:00
Vaxry 2566d81884 xwayland: fixup unfocus atom conditions
ref #6468
2024-06-16 12:38:09 +02:00
Vaxry df0c014ba0 xwayland: use safeRemove for removing files
fixes #6514
2024-06-15 16:06:07 +02:00
Vaxry 5de273a144 xwayland: drop some spammy logs to trace
fixes #6478
2024-06-13 17:32:32 +02:00
Vaxry 8c64a4bad7
core: move to hyprutils for utils (#6385)
* 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>
2024-06-11 17:17:45 +02:00
Vaxry 6967a31450
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl

it's the final countdown
2024-06-08 10:07:59 +02:00
Vaxry 5517cc506b xwayland: don't destroy server client
this potentially leaks, but avoids a UAF

ref #6323
2024-06-03 21:13:38 +02:00
Tom Englund eaecf7db14 core: fix a few asan reported issues and a coredump on exit (#6285)
* xwayland: add destructor to CXWM and free resource

the wl_event_resource was running upon destruction of the compositor
causing a null pointer segfault in onX11Event so ensure the event is
removed upon destruction, also free the memory allocated by
xcb_errors_context_new and finally call xcb_disconnect on the connection
to free the fd and its memory.

* hyprctl: dont leak the fd on destruction

add a destructor and properly free the fd on destruction

* eventloop: add destructor and free event source

properly free the wl_event_source upon destruction.
2024-06-03 18:46:20 +02:00
Vaxry a60c7283e6 xwayland: verify new xsurf is valid in prop reads
fixes #6250
2024-05-29 09:34:25 +02:00
Vaxry addd3e7f1a
xwayland: move to hyprland impl (#6086) 2024-05-25 22:43:51 +02:00