aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-14scene: add functions to place node on top/bottomIsaac Freund
These are very common operations for compositors (including tinywl) to perform.
2021-10-14scene: assert that node != sibling in place above/belowIsaac Freund
Currently these functions remove the node from the scene if the sibling argument is the same node as the node. To prevent confusion when misusing this API, assert that the nodes are distinct and document this.
2021-10-07examples/foreign-toplevel: fix toplevel not being freedfwsmit
2021-10-07xdg-decoration: refactor configure/state flowKirill Primak
The same logic/motivation as xdg-toplevel.
2021-10-06layer-shell: move NULL buffer check to role precommit handlerKirill Primak
This will allow compositor to access the current buffer before unmapping.
2021-10-06xdg-shell: remove redundant NULL buffer checkKirill Primak
This is already checked in role precommit handler, and if the buffer is NULL due to failed upload, that means the surface was already unmapped.
2021-10-05backend: drop unconditional and unused <libinput.h>Jan Beich
After 70fb21c35ba4 made libinput optional the include prevents building without libinput package installed. backend/backend.c:4:10: fatal error: 'libinput.h' file not found #include <libinput.h> ^~~~~~~~~~~~
2021-10-04render/allocator: use render node if available in reopen_drm_nodeSimon Ser
If we aren't trying to create a dumb buffer allocator, and if the DRM device has a render node (ie, not a split render/display SoC), then we can use the render node instead of the primary node. This should allow wlroots to run under seatd when the current user doesn't have the permission to open primary nodes (logind has a quirk to allow physically logged in users to open primary nodes).
2021-10-02surface_at: check if surfaces are mappedtiosgz
2021-10-02for_each_surface: only iterate mapped surfacestiosgz
These functions are used mostly for rendering, where including unmapped surfaces is undesired. This is a breaking change. However, few to no usages will have to be updated.
2021-10-02Fix spelling errorsElyes HAOUAS
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-01Revert "render/drm_format_set: add wlr_drm_format_has"Simon Ser
This reverts commit 833437d5921339f2862ccfb0493617630ea3937d.
2021-10-01Revert "Require INVALID for implicit format modifiers"Simon Ser
This reverts commit ea7357b70366588069c83f158e6a4eb2d3a702b3.
2021-10-01Revert "backend/drm: fail on explicit modifier in drmModeAddFB2"Simon Ser
This reverts commit d6be1d68b7d0542efa4dc2d19d57531484fe330a.
2021-10-01Revert "render/egl: always add LINEAR to supported modifiers"Simon Ser
This reverts commit 780052d4da0c93f9210dd87d2100b116af7ff308.
2021-10-01Revert "render/drm_format_set: remove special LINEAR case"Simon Ser
This reverts commit 6d281d96cb93b8de972039d5cb00bfce49d9a58c.
2021-10-01render/drm_format_set: remove special LINEAR caseSimon Ser
This was used to make the intersection of INVALID and LINEAR result in LINEAR. We can now just require LINEAR to be in both lists.
2021-10-01render/egl: always add LINEAR to supported modifiersSimon Ser
2021-10-01backend/drm: fail on explicit modifier in drmModeAddFB2Simon Ser
drmModeAddFB2 doesn't support explicit modifiers. Only accept INVALID which indicates an implicit modifier and LINEAR which may indicate that GBM_BO_USE_LINEAR has been used.
2021-10-01Require INVALID for implicit format modifiersSimon Ser
See [1] for the motivation. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
2021-10-01render/drm_format_set: add wlr_drm_format_hasSimon Ser
2021-09-30xdg-shell: stop clearing wlr_xdg_surface state on unmapSimon Ser
The protocol doesn't say we should, so let's not. Also it's pointless to reset scheduled_serial, since 0 is a valid serial.
2021-09-30xdg-shell: rename wlr_xdg_surface.next_configure_serialSimon Ser
Rename it to scheduled_serial for consistency with the rest of wlroots.
2021-09-30xdg-shell: introduce wlr_xdg_surface.currentSimon Ser
This holds the current state, and avoids having ad-hoc fields in wlr_xdg_surface.
2021-09-30xdg-surface: add pending stateKirill Primak
struct wlr_xdg_surface_state is introduced to hold the geometry and configure serial to be applied on next wl_surface.commit. This commit fixes our handling for ack_configure: instead of making the request mutate our current state, it mutates the pending state only. Co-authored-by: Simon Ser <contact@emersion.fr>
2021-09-30backend: create renderer and allocator in wlr_backend_autocreateSimon Ser
Instead of ensuring the renderer and allocator are initialized in each backend, do it in wlr_backend_autocreate. This allows compositors to create backends without any renderer/allocator if they side-step wlr_backend_autocreate. Since the wlr_backend_get_renderer and backend_get_allocator end up calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds like a good idea to centralize all of the opimionated bits in one place.
2021-09-27wlr_pointer_gestures: hold gestures (protocol v3)José Expósito
Update the pointer gestures protocol to version 3 allowing to send hold gestures to clients.
2021-09-27wlr_pointer_gestures: update protocol to version 2José Expósito
2021-09-27cursor: emit hold gesture eventsJosé Expósito
Recevie the hold gesture events from the libinput or Wayland backends, abstracted as pointer signals, and re-emit them from the cursor interface.
2021-09-27backend/wayland: send hold gesture eventsJosé Expósito
Receive hold gesture events using a Wayland listiner and emit the appropiate wlr_pointer signal.
2021-09-27backend/libinput: send hold gesture eventsJosé Expósito
Receive hold gesture events from libinput and emit the appropiate wlr_pointer signal.
2021-09-27build: check if libinput supports hold gesturesJosé Expósito
Add a project argument (LIBINPUT_HAS_HOLD_GESTURES) to allow building against old versions of libinput.
2021-09-27pointer: add hold pointer event definitionJosé Expósito
As touchpad touches are generally fully abstracted, a client cannot currently know when a user is interacting with the touchpad without moving. This is solved by hold gestures. Hold gestures are notifications about one or more fingers being held down on the touchpad without significant movement. Hold gestures are primarily designed for two interactions: - Hold to interact: where a hold gesture is active for some time a menu could pop up, some object could be selected, etc. - Hold to cancel: where e.g. kinetic scrolling is currently active, the start of a hold gesture can be used to stop the scroll. Unlike swipe and pinch, hold gestures, by definition, do not have movement, so there is no need for an "update" stage in the gesture. Create two structs, wlr_event_pointer_hold_begin and wlr_event_pointer_hold_end, to represent hold gesture events and the signals to emit them: wlr_pointer->pointer.hold_begin/hold_end.
2021-09-27protocol/meson: bump wayland-protocols requirement to 1.23José Expósito
2021-09-24Fix a typo in CONTRIBUTING.mdHubert Hirtz
2021-09-24layer-shell: add `committed` bitmaskKirill Primak
2021-09-23layer-shell: refactor configure/state flowKirill Primak
Same logic as xdg-toplevel.
2021-09-22scene: add wlr_scene_buffer_set_transformSimon Ser
2021-09-22scene: add wlr_scene_buffer_set_dest_sizeSimon Ser
2021-09-22scene: use scene_node_get_size in wlr_scene_node_atSimon Ser
This allows to unify the RECT and BUFFER code-paths. The BUFFER one will become more complicated with destination size and transforms.
2021-09-22scene: add scene_node_get_size helperSimon Ser
2021-09-22scene: add wlr_scene_buffer_set_source_boxSimon Ser
2021-09-22util/box: introduce wlr_fbox_emptySimon Ser
Same as wlr_box_empty, but for wlr_fbox.
2021-09-22scene: add wlr_scene_bufferSimon Ser
This new scene-graph node displays a wlr_buffer. Closes: https://github.com/swaywm/wlroots/issues/3161
2021-09-22scene: unify intersection logic in wlr_scene_node_atSimon Ser
Let's extract the common bits.
2021-09-22scene: drop default case in wlr_scene_node_atSimon Ser
This allows the compiler to error out if we haven't enumerated all of the cases. This is useful to avoid a missing implementation when adding a new node type.
2021-09-22Implement input_method_v2 popupsTadeo Kondrak
2021-09-22input-method-unstable-v2: Add error for surface with existing roleTadeo Kondrak
2021-09-21backend/drm: add support for panel orientationSimon Ser
Expose the panel orientation with wlr_drm_connector_get_panel_orientation. Leave it to the compositor to consume this information and configure the output accordingly. Closes: https://github.com/swaywm/wlroots/issues/1581
2021-09-21build: simplify get_variable callsSimon Ser
With recent-ish Meson we can stop repeating the variable name for each provider.