Simon Ser
72d1fd1446
backend/drm: simplify dealloc_crtc() commit
...
No need to manually call drm_connector_state_init() here, we can
just let drm_connector_commit_state() handle it.
2022-12-07 17:44:51 +01:00
Kirill Primak
79248e4961
xdg-shell: use defunct_role_object error
2022-12-07 13:54:31 +00:00
Simon Ser
90a6c7b7e1
backend/drm: fix VRR test
...
We were calling drm_connector_supports_vrr() before
drm_connector_alloc_crtc(). Thus, when an output is currently off,
the VRR test would always fail, because it checks that the
vrr_enabled CRTC prop exists.
2022-12-07 10:43:02 +01:00
Simon Ser
86fc2199f8
build: unify naming for HAVE_* defines
...
We sometimes used HAS_, sometimes polluted the LIBINPUT_ namespace,
etc.
2022-12-06 22:39:45 +00:00
Simon Ser
a4a40618ad
backend/libinput: use internal_config
...
Removes project arguments.
2022-12-06 22:39:45 +00:00
Simon Ser
cb6b1193c8
render/allocator/gbm: use internal_config
...
Removes a project argument.
2022-12-06 22:39:45 +00:00
Simon Ser
311381c6b5
xcursor: use internal_config
...
Removes a project argument, improves escaping.
2022-12-06 22:39:45 +00:00
Simon Ser
4da9b32a15
xwayland: use internal_config
...
Avoids the need to have a separate config.h, and removes C compiler
arguments.
2022-12-06 22:39:45 +00:00
Simon Ser
6c897756b6
build: use a configuration file for internal features
...
This avoids re-building the whole project when switching one
Meson option. This shrinks down the compiler invocation command
line, making it more readable and making it easier to inspect
which flags are passed in (the generated file can be opened).
Additionally this is more consistent with our external feature
handling, which uses <wlr/config.h> already.
2022-12-06 22:39:45 +00:00
Simon Ser
afe1ae4479
backend/x11: ensure buffers are released on shutdown
2022-12-06 20:22:55 +01:00
Simon Ser
378f471d29
backend/wayland: ensure buffers are released on shutdown
...
destroy_wl_buffer() is called from backend_destroy(). We need to
ensure the wlr_buffer is unlocked when we're waiting for a
wl_buffer.release event from the parent compositor.
2022-12-06 20:14:44 +01:00
Simon Ser
d72b4409ce
util/env: make env_parse_switch() return a size_t
...
This function is guaranteed to never return a negative value.
This is important because we use arr[env_parse_switch(...)] in a
few places.
2022-12-06 16:14:18 +01:00
Simon Ser
dc09585d14
util/env: add docs
...
I always forget what env_parse_switch() does on error.
2022-12-06 16:14:16 +01:00
Simon Ser
1bd0ba3949
render: simplify renderer_autocreate_with_drm_fd()
...
Use early returns to remove the !renderer checks.
2022-12-06 14:58:30 +00:00
Simon Ser
8456ac6fa9
render/vulkan: wait for DMA-BUF fences
...
The Vulkan spec doesn't guarantee that the driver will wait for
implicitly synchronized client buffers before texturing from them.
radv happens to perform the wait, but anv doesn't.
Fix this by extracting implicit fences from DMA-BUFs, importing
them into Vulkan as a VkSemaphore objects, and make the render pass
wait on these VkSemaphores.
2022-12-06 14:54:09 +00:00
Simon Ser
30219cf76b
render/dmabuf: add dmabuf_export_sync_file()
2022-12-06 14:54:09 +00:00
Kirill Primak
825f1b2dc6
tinywl: handle wlr_output.events.request_state
2022-12-06 09:05:32 +00:00
Ronan Pigott
f8e70af318
wlr_xdg_activation_v1: add new_token event
2022-12-06 05:45:37 +00:00
Kirill Primak
097ea84cda
output-layout: improve API
...
- wlr_output_layout_add{,_auto}() now return a bool indicating whether
the function has succeeded.
- wlr_output_layout_move() is removed.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1083
2022-12-05 18:21:04 +00:00
Kirill Primak
27ea18cc33
output-layout: remove wlr_output_layout_output_state
...
wlroots uses "// private state" comments to denote structure fields
which shouldn't be accessed by compositors, so let's drop
wlr_output_layout_output_state and inline its fields into
wlr_output_layout_output; this also simplifies layout output creation.
2022-12-05 18:21:04 +00:00
Kirill Primak
604df8b327
output-layout: fix function decl indentation
2022-12-05 18:21:04 +00:00
Simon Ser
532f3d3c20
xwayland/xwm: replace role with addon
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
2022-12-05 18:48:15 +01:00
Simon Ser
512deebd82
compositor: add wlr_surface.events.precommit
2022-12-05 10:51:46 +01:00
Kenny Levinsen
bb0fd29252
addon: Allow NULL owner of addon
...
An owner is not always required or practical. Rather than have the user
set a bogus owner in these cases, allow the user to set a NULL owner.
2022-12-05 10:51:46 +01:00
Simon Ser
d962918128
xwayland/xwm: rename xwm_map_shell_surface()
...
Rename xwm_map_shell_surface() to xwayland_surface_associate().
This function doesn't actually "map" the surface in Wayland
parlance, the wl_surface may not have a buffer attached yet.
2022-12-05 10:51:46 +01:00
Kirill Primak
bc4350c976
backend/wayland: reset active pointer on destroy
2022-04-29 21:55:04 +03:00
Kirill Primak
ec2af17674
CONTRIBUTING.md: update init/finish description
2022-04-28 08:30:26 +00:00
Simon Ser
a1e1e9aba8
Revert "backend/wayland: zero out finished input devices"
...
This reverts commit 03c88b07ba .
init functions now zero out the structs.
2022-04-28 10:09:50 +02:00
Simon Ser
6c350799b2
Zero-initialize structs in init functions
...
Ensures there is no field left to its previous undefined value after
calling an init function.
2022-04-28 10:09:50 +02:00
Simon Ser
54653b5d95
util/addon: fix public include
...
Everything in wlr/ is public and should be included via angle-bracket
include directives.
2022-04-26 09:43:10 +02:00
tiosgz
c091a07589
CONTRIBUTING.md: make forks public to let the CI run
...
This little note helps first-time contributors who are in doubt regarding the
repo visibility.
2022-04-24 17:07:04 +00:00
zsugabubus
91da4c557b
xwayland: do not double free server on destroy
2022-04-23 08:08:33 +00:00
Kirill Primak
03c88b07ba
backend/wayland: zero out finished input devices
2022-04-22 17:51:24 +00:00
Kirill Primak
a43d105a50
backend/wayland/pointer: fix indentation
2022-04-22 17:51:24 +00:00
Alexander Orzechowski
2ce0305483
seat: Don't finish wlr_keyboard if server was never started
2022-04-22 01:49:58 +00:00
John Lindgren
640f3b9f21
Revert "Copy xcb_icccm structs into wlroots"
...
The original commit introduced a bug by transposing the order of
some of the fields in xcb_size_hints_t. Since XCB ICCCM support is
required now, we can just eliminate the duplicate structs.
With minor changes:
- Remove #ifdef HAS_XCB_ICCCM guards
- Fix #includes
- Fix references to local size_hints struct
This reverts commit 12b9b1a4bd .
2022-04-17 14:44:52 +00:00
Ferdinand Bachmann
d3a2ea33e5
types/seat/wlr_seat.c: fix focused_client being null after seat_client recreation
2022-04-16 20:56:30 +02:00
Ferdinand Bachmann
2d4e813530
types/wlr_pointer_gestures_v1.c: get client from seat client instead of resource
2022-04-16 20:53:52 +02:00
Ferdinand Bachmann
eedb9df531
types/wlr_pointer_gestures_v1: null-check both focused_surface and focused_client
...
(fixes #3385 )
2022-04-15 16:06:16 +02:00
Kirill Primak
4ba8458255
scene/output-layout: fix scene destroy handler
2022-04-14 06:51:39 +00:00
Kirill Primak
dec2565f2b
xdg-toplevel: don't schedule configures on state requests
2022-04-13 17:00:06 +00:00
Kirill Primak
04aa44b4df
xdg-foreign-v2: treat unmapped parents as NULL
2022-04-13 16:48:15 +00:00
Kirill Primak
dac040f87f
xdg-foreign-v1: treat unmapped parents as NULL
2022-04-13 16:48:15 +00:00
Kirill Primak
bf3f60ff73
xdg-toplevel: treat unmapped parents as NULL
2022-04-13 16:48:15 +00:00
Kirill Chibisov
2e14bed9f7
meson: use target_machine instead of host_machine
2022-04-03 11:46:25 +00:00
Kirill Primak
578e5614d4
tinywl: remove outdated non-feature from README.md
...
Now that tinywl uses wlr_scene under the hood, damage tracking comes for
free.
2022-04-01 14:22:28 +00:00
Kirill Primak
62fbf3f4ba
tinywl: don't generate xdg-shell-protocol.c
...
It's unused, and wlroots-based compositors don't need to do this anyway.
2022-04-01 11:51:24 +03:00
Kenny Levinsen
bb32349c97
meson: soversion arg should be string
...
muon, a meson implementation in C, is more strict with its types and
revealed this discrepancy between meson behavior and documentation.
2022-03-28 20:21:49 +02:00
Guido Günther
dd03d839ab
xdg-activation: Deduplicate token creation code
...
There were three places initializing a token:
- wlr_xdg_activation_v1_add_token
- wlr_xdg_activation_token_v1_create
- activation_handle_get_activation_token
The initialization of the token.destroy was missing in the first one. To
prevent these functions from getting out of sync move the token creation
into a common function.
Fixes 4c59f7d4 ("xdg-activation: Allow to submit tokens")
2022-03-26 17:28:51 +01:00
Leonardo Hernández Hernández
4519117a68
seat: take wlr_keyboard in wlr_seat_set_keyboard()
...
Signed-off-by: Leonardo Hernández Hernández <leohdz172@protonmail.com>
2022-03-23 13:08:41 +00:00