Commit Graph

138 Commits

Author SHA1 Message Date
Mihai Fufezan
e419ef1873
Revert "CMake: use add_custom_command for generating protocols (#6104)"
Fixes https://github.com/hyprwm/Hyprland/issues/6115.
2024-05-21 21:29:56 +03:00
giskard
3c907f7830 build: update meson, cmake setup
- meson
. fix run_command() check warning
. drop lines for compatability, as it's already using c++23

- cmake
. generate `compile_commands.json` by default
. position independent build: __FILE__
2024-05-21 20:36:07 +03:00
Yaroslav
f91431465b
cmake: make gprof optional for debug builds (#6120)
This fixes the debug build on musl systems, as -pg option is specific to
glibc. Now we can build the project on such systems with -DUSE_GPROF=OFF
2024-05-17 11:06:31 +01:00
Yaroslav
a66cfe0fbe
CMake: use add_custom_command for generating protocols (#6104)
This fixes an issue with build error in case of e.g.

$ rm protocols/*.{c,h}
$ cmake --build build

The workaround was to touch CMakeLists.txt. With this PR, protocol files
are properly regenerated with no extra efforts.

Also, resolve hyprwayland-scanner dependency via cmake instead
ofpkg-config.
2024-05-17 01:34:03 +03:00
Vaxry
a2643e11a0 build: bump hw-s dep to 0.3.8 2024-05-16 18:35:48 +01:00
Vaxry
94c20a1863 primary-selection: move to hyprland impl 2024-05-14 23:13:35 +01:00
Vaxry
eed1361f39 wlr-data-device: move to hyprland impl 2024-05-14 23:13:35 +01:00
Vaxry
0cfdde3d1a xdg-shell: move to new impl 2024-05-14 23:02:24 +01:00
Vaxry
121d3a7213 wl_seat: move to hyprland impl 2024-05-14 23:02:24 +01:00
Vaxry
47874f09f4 cmake: remove forceful ffi and wayland deps for asan
fixes #6050
2024-05-13 15:29:18 +01:00
Vaxry
a7e23d2f1e presentation-time: move to new impl 2024-05-10 02:38:54 +01:00
Vaxry
635a02d83f layer-shell: move to new impl
Also bumps the hw-s dep
2024-05-09 22:02:18 +01:00
Vaxry
84e8d1810d Tablet: move to new impl
Ring and strip are not implemented. Will I implement this? God fucking knows. Nobody seems to have that anyways.
2024-05-09 13:37:39 +01:00
Vaxry
601210878d cmake: bump hw-s required ver to 0.3.5 2024-05-07 21:03:26 +01:00
Vaxry
1ed1ce9506
internal: new shared_ptr and weak_ptr implementation (#5883)
moves std::shared_ptrs to a new implementation

Advantages:
- you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired.
   - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.)
- weak_ptrs are still valid while the SP is being destroyed.
   - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection)
   - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though.
   - this is useful in destructors and callbacks.
2024-05-05 17:16:00 +01:00
Mihai Fufezan
99aa34db6e CMake: install files (instead of Makefile) 2024-05-05 16:30:39 +03:00
outfoxxed
aaf35b9f1f
protocols: add hyprland_focus_grab_v1 implementation (#5850)
* protocols: add hyprland_focus_grab_v1 implementation

* protocols/focus_grab: fix keyboard focus staying on unlisted windows

When creating a focus grab with layershell surfaces, the last active
toplevel kept keyboard focus.

* protocols/focus_grab: fix formatting

* protocols/focus_grab: try to pick surface for keyboard focus

* focus_grab: update keyboard focus to match spec

* Revert "protocols/focus_grab: try to pick surface for keyboard focus"

This reverts commit 090358d0d1.

* protocols/focus_grab: fix issues and match new spec

* kde-server-decoration: move to new impl

* protocols/focus_grab: review fixup

* Update hyprland-protocols

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2024-05-05 03:14:35 +01:00
Vaxry
62eadad20f kde-server-decoration: move to new impl 2024-05-05 02:00:55 +01:00
Vaxry
8a2269272b output-management: move to new impl 2024-05-03 18:08:04 +01:00
Vaxry
2755297670 virtual-pointer: move to new impl 2024-05-03 01:52:05 +01:00
Vaxry
6aa2d123ae virtual-keyboard: move to new impl 2024-05-03 00:31:48 +01:00
Vaxry
0237e39f74 protocols: utilize hyprwayland-scanner 0.3.3 functions
stuff like ::version(), ::client(), ::error() etc
2024-05-01 19:40:35 +01:00
Vaxry
8bcccf9f0f ime-v2: move to new impl 2024-05-01 16:41:17 +01:00
Vaxry
90e1411315 session-lock: move to new impl 2024-04-30 16:34:09 +01:00
Vaxry
f2b03e9679 ext-idle-notify: move to new impl 2024-04-29 17:50:07 +01:00
Vaxry
86133983a9 xdg-activation: move to new impl 2024-04-29 16:43:24 +01:00
Vaxry
33e0bb1478 wlr-output-power: move to new impl 2024-04-29 01:38:24 +01:00
Vaxry
25aec3ac8c pointer-constraints: move to new impl 2024-04-27 03:17:04 +01:00
Vaxry
1d40af64d3 text-input-v3: move to new impl 2024-04-25 23:27:44 +01:00
Vaxry
01df3b73d8 shortcuts-inhibitor: move to new impl 2024-04-25 14:32:35 +01:00
Vaxry
ecf282d331 wlr-foreign-toplevel: move to new impl 2024-04-25 01:10:43 +01:00
Vaxry
3878f806ff pointer-gestures: move to new impl 2024-04-24 21:36:56 +01:00
Vaxry
932a0cd777 cmake: require hyprwayland-scanner 0.3.0 2024-04-24 16:39:18 +01:00
Vaxry
0d1bb65c75 ext-foreign-toplevel: add implementation 2024-04-24 15:48:06 +01:00
Vaxry
5262292abc cmake: add uuid to deps 2024-04-23 02:22:30 +01:00
Vaxry
7778f01194 managers: Add a TokenManager 2024-04-23 01:28:27 +01:00
Vaxry
741c75d907 gamma-control: move to new impl 2024-04-22 18:21:03 +01:00
Vaxry
f587c3e0ba alpha-modifier: add support for protocol 2024-04-21 21:21:22 +01:00
Vaxry
ed69502ff6 xdg-decoration: move to new impl 2024-04-21 20:04:58 +01:00
Vaxry
4954dcbbb3 relative-pointer: move to new impl 2024-04-21 19:30:23 +01:00
Vaxry
d9fe1d0f58 idle-inhibit: move to new impl 2024-04-21 16:54:52 +01:00
Vaxry
30e4b404f2 cursor-shape: move to new impl 2024-04-21 01:49:23 +01:00
Vaxry
84ee839ca6 XDG-Output: move to hyprwayland-scanner 2024-04-20 19:39:59 +01:00
Yaroslav
a945346064
core: remove libsystemd dependency (#5660)
* remove libsystemd dependency

as per Lennart Poettering's advice:
https://github.com/systemd/systemd/issues/32028#issuecomment-2031366922

* fix naming for systemd helper functions

* rename vars according to code style

* Nix: update meson patch

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-04-20 18:50:07 +01:00
Vaxry
ea47e8c92a Fractional-scale: move to new impl 2024-04-20 14:19:16 +01:00
Vaxry
ea95449402
core: Move tearing to hyprwayland-scanner (#5657)
Adds a new dependency: hyprwayland-scanner https://github.com/hyprwm/hyprwayland-scanner

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-04-20 13:25:29 +01:00
Vaxry
b52a49b4c4
tearing-control: hyprland impl (#5655)
* tearing: hl impl

* format
2024-04-19 22:16:35 +01:00
Vaxry
3dbf8e936e cursor: add hyprcursor loggers 2024-04-15 16:45:08 +01:00
Jan Beich
2ea367839b
build: Unbreak build on FreeBSD by adjusting dependencies (#5595)
* deps: add epoll-shim for some BSDs after 863c7b6072

ld: error: undefined symbol: timerfd_create
>>> referenced by EventLoopManager.cpp
>>>               src/Hyprland.p/managers_eventLoop_EventLoopManager.cpp.o:(CEventLoopManager::CEventLoopManager())

ld: error: undefined symbol: timerfd_settime
>>> referenced by EventLoopManager.cpp
>>>               src/Hyprland.p/managers_eventLoop_EventLoopManager.cpp.o:(CEventLoopManager::nudgeTimers())

See also
https://github.com/freebsd/freebsd-src/commit/af93fea71038
https://github.com/netbsd/src/commit/75f1bc6655cf

* deps: drop unused xcb-image after 45945a3e7d

$ pkg install <hyprland dependencies>
$ pkg install meson jq `pkg rquery %dn wlroots` hwdata
$ gmake all
[...]
-- Checking for modules 'xcb;xwayland;xcb-util;xcb-render;xcb-image;xcb-xfixes;xcb-icccm;xcb-composite;xcb-res;xcb-ewmh'
--   Package 'xcb-image' not found
CMake Error at /usr/local/share/cmake/Modules/FindPkgConfig.cmake:619 (message):
  The following required packages were not found:

   - xcb-image

Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
  CMakeLists.txt:177 (pkg_check_modules)

See also
https://github.com/swaywm/wlroots/commit/ae7c3f3d1c56
2024-04-15 14:42:17 +01:00
Yaroslav
9e4b2efe7e
cmake: Some small cmake cleanups (#5572)
* remove unnecessary include

* cmake: use pkg_get_variable

We can find wayland-scanner executable and wayland-protocols dir by
taking advantage of this function, so no need to use find_program or
manually call pkgconf executable.

* cmake: remove explicit rdynamic option

CMAKE_ENABLE_EXPORTS=ON already implies rdynamic so it's redundant to
set the latter explicitly.

Also, CMAKE_ENABLE_EXPORTS is superseded by
CMAKE_EXECUTABLE_ENABLE_EXPORTS in cmake 3.27.

* cmake: make xcb-errors dep optional

xcb-errors is being used in wlroots, where it's optional. So make it
optional in hyprland as well
2024-04-13 14:40:28 +01:00