aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-12backend/wayland: Listen to pointers from all seatsMykola Orliuk
This effectively gets swaywm/wlroots#1499 to the point where functionality somewhat preserved and no crash happens. We still can have only one cursor, but we can control it from multiple seats in time-sharing manner by entering/leaving output.
2020-11-12backend/wayland: Use seat name in input namesMykola Orliuk
2020-11-12backend/wayland: Add registering multiple seatsMykola Orliuk
2020-11-12backend/wayland: Link input devices with seatsMykola Orliuk
2020-11-12backend/wayland: Bind seat listener to wlr_wl_seatMykola Orliuk
2020-11-11Remove unneeded includes from wlr_input_device.hIsaac Freund
This uncovered many places where we were using things without directly including them.
2020-11-11Use uint32_t in wlr_renderer_begin signatureIsaac Freund
This matches the signature of wlr_renderer_impl.begin
2020-11-11Replace wlr_key_state with wl_keyboard_key_stateIsaac Freund
There's no reason to have duplicate enums
2020-11-08Update version to 0.12.0Simon Ser
2020-11-08xdg_shell: handle inert popupsIlia Bozhinov
xdg_popups can be destroyed by the compositor when closed. When this happens, wlroots makes the xdg_popup surface inert and resets the xdg_surface role to NONE. Currently, wlroots sends a protocol error and asserts that an xdg_surface has a role when committed. This is racy if at the same time the client commits an xdg_popup and the compositor closes it. This patch removes the assertion and ignores commits on xdg_surfaces without a role set.
2020-11-06input-method: send modifiers in set_keyboardSimon Ser
Otherwise the client might have an outdated modifiers state. The same is done in wlr_seat_keyboard [1]. [1]: https://github.com/swaywm/wlroots/blob/8348fc3ef8b992fce097bef81111eda3677957f4/types/seat/wlr_seat_keyboard.c#L163
2020-11-05xwayland: remove unused listenerIsaac Freund
2020-11-05screencopy: send failed when copying a DMA-BUF with a regionSimon Ser
We don't support that yet.
2020-11-05screencopy: perform DMA-BUF copy on output commitSimon Ser
2020-11-05export-dmabuf: export DMA-BUF on output commitSimon Ser
We were previously exporting DMA-BUFs when receiving the capture_output request, and sending a done event on wlr_output.events.precommit. Instead, export and send done on wlr_output.events.commit.
2020-11-05output: add when field to wlr_output_event_commitSimon Ser
Similar to the one already present in wlr_output_event_precommit.
2020-11-05output: update docs to reflect realitySimon Ser
The docs were outdated and weren't matching what the DRM backend does (the only implementor of wlr_output_export_dmabuf).
2020-11-05backend/drm: export pending FB in export_dmabuf, if anySimon Ser
This allows callers to grab the current frame right after committing it, without having to incur a full vblank worth of latency.
2020-11-04screencopy: stop setting needs_frame flagSimon Ser
This is already done by wlr_output_schedule_frame (it calls wlr_output_update_needs_frame).
2020-11-03gamma-control-v1: apply gamma LUT when output gets enabledSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/2372
2020-11-03xwayland: log unhandled NET_WM_STATE property changesSimon Ser
2020-11-03xwayland: minor code style fixesSimon Ser
2020-11-03backend/drm: fix "a page-flip is already pending" errors on modesetSimon Ser
When performing a modeset, the DRM backend will request a page-flip event. However frame_pending wasn't set to true, so any subsequent wlr_output_schedule_frame calls would imemdiately trigger a synthetic frame event, asking the compositor to submit a new frame. Committing the new frame fails with "a page-flip is already pending" error in the DRM backend.
2020-11-02render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)Simon Ser
This avoids Xlib.h inclusion via EGL headers. See [1] for discussion. This change is based on a Weston commit [2]. [1]: https://github.com/KhronosGroup/EGL-Registry/pull/111 [2]: https://gitlab.freedesktop.org/wayland/weston/commit/526765ddfdfd
2020-10-31render/dmabuf: use bitmask for wlr_dmabuf_attributes_flagsTudor Brindus
2020-10-31util/edges: use bitmask for wlr_edgesTudor Brindus
2020-10-31types/wlr_output_layout: use bitmask for wlr_directionTudor Brindus
2020-10-31types/wlr_keyboard: use bitmasks for wlr_keyboard_led and ↵Tudor Brindus
wlr_keyboard_modifier enums
2020-10-30backend/drm: Check if output is enabled before sending frame eventMarten Ringwelski
When an output is disabled one last pageflip will happen to disable it. Currently this pageflip causes a frame event. Since the output is disabled we don't want to send this frame event.
2020-10-27xdg_shell: fix a typoIlia Bozhinov
2020-10-20foreign toplevel: Fix whitespace errorScott Moreau
2020-10-20foreign toplevel: send parent event only to clients that support itDaniel Kondor
2020-10-20xwayland: fix minor typo in debug logTudor Brindus
This accidentally slipped through 1b0e4c7.
2020-10-18backend/wayland: fix some keyboard/touch leaksMykola Orliuk
2020-10-18backend/wayland: fix input creation error handlingMykola Orliuk
2020-10-18backend/wayland: add error flow in create_wl_seatMykola Orliuk
2020-10-18foreign-toplevel-management: report parent toplevelDaniel Kondor
Based on the wlr-protocols PR: https://github.com/swaywm/wlr-protocols/pull/52
2020-10-18backend/wayland: factor out wlr_wl_seatMykola Orliuk
2020-10-18backend/wayland: manage cursor for current pointerMykola Orliuk
2020-10-18backend/wayland: add touch support to the wayland backendIlia Bozhinov
Goal currently is to get support working for a single output, thus there is only one touch device created. Multi-output support is left for later.
2020-10-18wlr_drag: remove unused point_destroy fieldIsaac Freund
2020-10-16xdg_positioner: remove unused fieldIsaac Freund
The resource field of wlr_xdg_positioner is never initialized or accessed within wlroots. The wl_resource for this interface is stored in the wlr_xdg_positioner_resource struct.
2020-10-14xwayland: add set_geometry eventIlia Bozhinov
This is necessary to react to changes in position of override-redirect views.
2020-10-13xwayland: notify requestor when we fail to respond to their requestTudor Brindus
We already mostly did this, but there were a couple of branches (`calloc` failures) where we'd bail without letting the other side know. Refs swaywm/sway#4007. Likely not going to be a real improvement there (if `calloc` fails you're already pretty screwed), but it does address a theoretical possibility.
2020-10-12xwayland: remove stale transfers from the same requestorTudor Brindus
It seems that if we ever try to reply to a selection request after another has been sent by the same requestor (we reply in FIFO order), the requestor never reads from it, and we end up stalling forever on a transfer that will never complete. It appears that `XCB_SELECTION_REQUEST` has some sort of singleton semantics, and new requests for the same selection are meant to replace outstanding older ones. I couldn't find a reference for this, but empirically this does seem to be the case. Real (contrived) case where we don't currently do this, and things break: * run fcitx * run Slack * wl-copy < <(base64 /opt/firefox/libxul.so) # or some other large file * focus Slack (no need to paste) fcitx will send in an `XCB_SELECTION_REQUEST`, and we'll start processing it. Immediately after, Slack sends its own. fcitx hangs for a long, long time. In the meantime, Slack retries and sends another selection request. We now have two pending requests from Slack. Eventually fcitx gives up (or it can be `pkill`'d), and we start processing the first request Slack gave us (FIFO). Slack (Electron?) isn't listening on the other end anymore, and this transfer never completes. The X11 clipboard becomes unusable until Slack is killed. After this patch, the clipboard is immediately usable again after fcitx bails. Also added a bunch of debug-level logging that makes diagnosing this sort of issue easier. Refs swaywm/sway#4007.
2020-10-11xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to useTudor Brindus
When debugging Xwayland-related issues, a common first step in debugging has been to ask the reporter to move their real Xwayland to /usr/bin/Xwayland.bin, and create a shell script starting Xwayland with extra arguments under the original /usr/bin/Xwayland location. Introducing a `WLR_XWAYLAND` environment variable makes this less invasive, by allowing the user to swap out Xwayland without resorting to global system changes (or source patches).
2020-10-11xwayland: fix use-after-free in selection handlingTudor Brindus
Fixes #2425. wlroots can only handle one outgoing transfer at a time, so it keeps a list of pending selections. The head of the list is the currently-active selection, and when that transfer completes and is destroyed, the next one is started. The trouble is when you have a transfer to some app that is misbehaving. fcitx is one such application. With really large transfers, fcitx will hang and never wake up again. So, you can end up with a transfer list that looks like this: | T1: started | T2: pending | T3: pending | T4: pending | The file descriptor for transfer T1 is registered in libwayland's epoll loop. The rest are waiting in wlroots' list. As a user, you want your clipboard back, so you `pkill fcitx`. Now Xwayland sends `XCB_DESTROY_NOTIFY` to let us know to give up. We clean up T4 first. Due to a bug in wlroots code, we register the (fd, transfer data pointer) pair for T1 with libwayland *again*, despite it already being registered. We do this 2 more times as we remove T3 and T2. Finally, we remove T1 and `free` all the memory associated with it, before `close`-ing its transfer file descriptor. However, we still have 3 copies of T1's file descriptor left in the epoll loop, since we erroneously added them as part of removing T2/3/4. When we `close` the file descriptor as part of T1's teardown, we actually cause the epoll loop to wake up the next time around, saying "this file descriptor has activity!" (it was closed, so `read`-ing would normally return 0 to let us know of EOF). But instead of returning 0, it returns -1 with `EBADF`, because the file descriptor has already been closed. And finally, as part of error-handling this, we access the transfer pointer, which was `free`'d. And we crash.
2020-10-11xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` insteadTudor Brindus
This one was awful to track down, but calls to `wlr_log` with %m have the errno masked by the `isatty` call in `log_stderr`. Switch them to `wlr_log_errno` instead. Cue quality "how can read(2) POSSIBLY be returning ENOTTY?" moments.
2020-10-11examples: use `perror` instead of `fprintf` GNU %m `printf` extensionTudor Brindus
2020-10-10backend/libinput: improve logger callbackSimon Ser
- Add a prefix to make it clear log messages come from libinput - Properly convert libinput log priority to wlroots'