aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-10backend/drm: GAMMA_LUT_SIZE isn't atomicSimon Ser
GAMMA_LUT_SIZE isn't an atomic property. It can be used with the legacy interface too. So we can unify both codepaths and remove wlr_drm_interface.crtc_get_gamma_size. It's no guaranteed to exist though, so we still need to keep the fallback.
2020-05-09backend/drm: remove crtc_set_cursor from interfaceSimon Ser
2020-05-09backend/drm: remove conn_enable from interfaceSimon Ser
Use crtc_commit instead.
2020-05-09backend/drm: rename crtc_pageflip to crtc_commitSimon Ser
Also add a flags argument. The commit function will also be used for disabling the CRTC.
2020-05-09backend/drm: apply gamma LUT on page-flipSimon Ser
2020-05-09backend/drm: remove mode argument to crtc_pageflipSimon Ser
Add a new wlr_drm_crtc.pending bitfield which keeps track of pending output changes. More fields will be added in the future (e.g. active, gamma).
2020-05-09backend/drm: remove unused fieldsSimon Ser
2020-05-09backend/drm: remove wlr_drm_interface.crtc_move_cursorSimon Ser
Instead, make the legacy backend call drmModeMoveCursor on page-flip.
2020-05-07input/keyboard: expose keymap matching helperTudor Brindus
sway needs this logic too, and currently ships a version that has fallen behind in terms of bugfixes (b1a63bc).
2020-05-04backend/wayland: emit tablet tool axis events to the axis handlerTudor Brindus
2020-05-04wlr/types: use bitshifts for tablet axes enumTudor Brindus
2020-05-02backend/headless: handle renderer destroySimon Ser
When the headless backend uses an already-existing renderer, it doesn't have ownership over the renderer. When the renderer is destroyed, the headless backend needs to destroy itself.
2020-05-02backend/multi: handle backends depending on each other properlySimon Ser
wl_list_for_each_safe only allows the current list item to be removed. If a backend destroys itself when another backend is destroyed, this blows up.
2020-05-02Add wlr_surface_accepts_touchDavid96
2020-05-02layer shell: only send unmap on close if mappedIsaac Freund
2020-05-01examples/dmabuf-capture: use getoptSimon Ser
This makes it a little bit less annoying to provide the right arguments. All options have reasonable defaults.
2020-05-01backend/drm: make page-flip error scarierSimon Ser
The logs don't currently display the importance of a line. It's easy to read "skipping page-flip" as a debug message instead of an error message. Change the error message to make it more explicit. References: https://github.com/swaywm/wlroots/pull/2147
2020-05-01util/log: write log importanceSimon Ser
When colors aren't used, write the log importance to stderr. This makes it easier to grep for errors and avoids mistaking error messages for debug messages.
2020-05-01Fix error when reconnecting external displayWill Daly
Reconnecting an external display fails on initial page-flip. This occurs when the pageflip_pending flag has been set on the connector at the time the monitor is removed. Once the connector's CRTC has been deallocated, page_flip_handler cannot find the connector by its crtc_id, so pageflip_pending will remain set. This causes initialization to fail when the monitor is reconnected with the error messages: Skipping pageflip on output 'X' Failed to initialize renderer on connector 'X': initial page-flip failed To fix this problem, clear the pageflip_pending flag when cleaning up the connector.
2020-04-30Remove .swp file added by mistakeSimon Ser
Fixes: d6983346209f ("input/tablet: clear focused surface on surface destroy")
2020-04-30input/tablet: clear focused surface on surface destroyTudor Brindus
Otherwise, we can end up left with a dangling pointer to a previously-focused, now-destroyed surface. Fixes swaywm/sway#5264.
2020-04-29Remove libcap supportScott Anderson
This is simply a false sense of security, and is worse than just using setuid. CAP_SYS_ADMIN is an extremely serious capability that is effectively as powerful as root. It also required users to be in the input group, which allows any process to keylog the entire system.
2020-04-29backend/drm: strip alpha channel if necessarySimon Ser
Some primary planes don't support ARGB8888, they only support XRGB8888 (for instance on older Intel hardware). The DRM backend would fail to initialize. When that's the case, try to allocate buffers without an alpha channel.
2020-04-28render/texture: make write_pixels optionalSimon Ser
2020-04-28render/texture: add width and height fieldsSimon Ser
Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields.
2020-04-28tinywl: Fix wrong anchor point while resizing a windowGreg Depoire--Ferrer
Previously, when dragging the left border of a window with the mouse in tinywl, there was a bug where it snap the top level surface's geometry X coordinate directly to the position of the mouse, as if you started the resize right on the border. This also affected the other (right, top and bottom) borders. I think that the previous resize code was hard to understand. Honestly I have not spent a lot of time trying to understand why it didn't work and I wrote another resize algorithm instead: now, instead of working directly with widths and heights which are complicated, we work with the borders (left, right, top, bottom). This is easier to understand IMO. Note: I originally fixed this [in the waybox compositor](https://github.com/wizbright/waybox/pull/23) but then I realized that the code was taken from tinywl and that it had the same issues so I copied my fix for tinywl.
2020-04-28backend/drm: don't allow legacy to use direct scanoutScott Anderson
2020-04-28backend/drm: move atomic cursor code into pageflip codeScott Anderson
It makes sense to construct as much atomic state as possible in the same place, so it doesn't get lost if we "reset" it.
2020-04-28backend/drm: don't have fallback atomic commitsScott Anderson
This is just doing atomic incorrectly.
2020-04-28backend/drm: introduce wlr_drm_fbScott Anderson
This is a type which manages gbm_surfaces and imported dmabufs in the same place, and makes the lifetime management between the two shared. It should lead to easier to understand code, and fewer special cases. This also contains a fair bit of refactoring to start using this new type. Co-authored-by: Simon Ser <contact@emersion.fr>
2020-04-28tinywl: handle request set selectionIsaac Freund
2020-04-28tinywl: remove unused variablesIsaac Freund
2020-04-27input/tablet: fix up updated axes after rotationTudor Brindus
In the case that only one axis received an event, rotating the input can cause the change to actually happen on the other axis, as far as clients are concerned. This commit updates the axes flags to be consistent post-rotation. Fixes swaywm/sway#4776.
2020-04-27export-dmabuf: Schedule output frame on requestAndri Yngvason
A client requesting frames in the ready callback may miss frames that happen while it is waiting to receive the event or sending the request. If that happens, the client will have an outdated frame for an indefinite period. A new frame might not be scheduled for a very long time. With this change, clients will receive new frames immediately upon request.
2020-04-27input/tablet: populate tool tip event positionTudor Brindus
This commit doesn't fix any issue that I'm aware of, since sway incidentally does not use these fields. Still, they exist, so they should probably be filled in to prevent fun surprises in the future.
2020-04-23tinywl: fix geo_box bug in cursor resizingKalyan Sriram
While trying out the tinywl code, I found that the resize mode was behaving weirdly ... so I looked into code. Turns out the `begin_interactive` method stores the cursor position plus the geo_box position; however, `process_cursor_resize` wasn't taking this into account, causing windows to jump down in size unexpectedly when resized and lose alignment with the cursor. To fix this, I simply added a member to the `tinywl_server` struct that stores the geo_box when the mouse enters grab mode, and I referenced that data in the resize method. I considered polling for this data every time instead of storing it in the server struct, but 1) since changes in this value are not relevant and 2) it could potentially decrease performance (I don't know enough about wlroots to know how much) I decided to just store it. I can change this if desired.
2020-04-22backend/headless: add wlr_headless_backend_create_with_rendererSimon Ser
This allows one to create a headless backend with an existing renderer.
2020-04-22backend/headless: use FBOs instead of pbuffersSimon Ser
2020-04-22render/gles2: add wlr_gles2_renderer_check_extSimon Ser
2020-04-22render/drm_format_set: disallow DRM_FORMAT_INVALIDSimon Ser
It doesn't make sense to add DRM_FORMAT_INVALID to a format set. Adding an assertion allows us to safely query the format set with DRM_FORMAT_INVALID. See [1]. [1]: https://github.com/swaywm/wlroots/pull/2021#discussion_r385839668
2020-04-22output_layout: improve docsSimon Ser
2020-04-21build: use summary instead of messageSimon Ser
2020-04-21build: use dicts instead of get_variableSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/1963
2020-04-21build: use meson.override_dependencySimon Ser
When built as a subproject, this removes the need for the parent project to know about the dependency variable name. This requires Meson 0.54.0.
2020-04-21backend/libinput: correctly populate x/y fields on tablet proximity inTudor Brindus
Otherwise, the cursor will briefly jump to (0, 0). This is particularly noticeable in the referenced issue (the game osu!). Refs swaywm/sway#3633
2020-04-17Document the events of wlr_layer_surfaceIsaac Freund
2020-04-15logind: Close fd before releasing deviceKenny Levinsen
This speeds up shutdown significantly, and is in line with how Weston does it.
2020-04-15seat: add selection event docsTudor Roman
2020-04-15tinywl: remove redundant create output global callIsaac Freund
2020-04-14backend/multi: add backends at end of listSimon Ser
This allows wlr_multi_for_each_backend to iterate on the backends in the order where they have been added.