aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2020-04-14seat: add check for NULL keyboardr-c-f
Check for a NULL keyboard_state.keyboard value in seat_client_create_keyboard() before trying to use it, as is done in other functions like seat_client_send_repeat_info(). Prevents a segfault in certain situations on keyboard removal, as seen in the sway issue. Closes: https://github.com/swaywm/sway/issues/5205 Closes: https://github.com/swaywm/wlroots/issues/2073
2020-04-10output: fix maybe-uninitialized warningSimon Ser
GCC is complaining about a maybe-uninitialized variable when doing a release build. Even if that can't actually happen because all enum values are handled, add an abort call to silence the warning.
2020-04-10backend/wayland: check scan-out buffer is compatible in output_testSimon Ser
If the buffer doesn't have a supported format/modifier, make the test fail.
2020-04-10output: check for buffer size compatibility in common codeSimon Ser
Instead of checking for buffer size compatibility in each backend, centralize the check in wlr_output itself.
2020-04-10output: fix blurred hw cursors with fractional scalingSimon Ser
The scaling factor was being implicitly cast to an int. Closes: https://github.com/swaywm/sway/issues/4927
2020-04-09render: only expose linux-dmabuf if EGL extension is supportedSimon Ser
Only expose linux-dmabuf extension if EGL_EXT_image_dmabuf_import_ext is supported. Closes: https://github.com/swaywm/wlroots/issues/2076
2020-04-09render/gles2: only call wlr_egl_bind_display if supportedSimon Ser
This allows us to hard-fail if the extension is advertised but we fail to enable it.
2020-04-09backend: set EGL_RENDERABLE_TYPE and EGL_SURFACE_TYPESimon Ser
Ensure these are set to the correct value.
2020-04-09render/egl: make config attribs constSimon Ser
wlr_egl_init is not allowed to mutate these attribs.
2020-04-08Add wlr_output_impl.rollbackSimon Ser
Most of the pending output state is not forwarded to the backend prior to an output commit. For instance, wlr_output_set_mode just stashes the mode without calling any wlr_output_impl function. wlr_output_impl.commit is responsible for applying the pending mode. However, there are exceptions to this rule. The first one is wlr_output_attach_render. It won't go away before renderer v6 is complete, because it needs to set the current EGL surface. The second one is wlr_output_attach_buffer. wlr_output_impl.attach_buffer is removed in [1]. When wlr_output_rollback is called, all pending state is supposed to be cleared. This works for all the state except the two exceptions mentionned above. To fix this, introduce wlr_output_impl.rollback. Right now, the backend resets the current EGL surface. This prevents GL commands from affecting the output after wlr_output_rollback. This patch is required for FBO-based outputs to work properly. The compositor might be using FBOs for its own purposes [2], having leftover FBO state can have bad consequences. [1]: https://github.com/swaywm/wlroots/pull/2097 [2]: https://github.com/swaywm/wlroots/pull/2063#issuecomment-597614312
2020-04-08backend: reset EGL surface after buffer swapSimon Ser
This prevents GL commands to affect a previously current EGL surface after a buffer swap.
2020-04-08output: check buffer in wlr_output_testSimon Ser
Check that buffer can be scanned out in wlr_output_test instead of wlr_output_attach_buffer. This allows the backend to have access to the whole pending state when performing the check. This brings the wlr_output API more in line with the KMS API. This removes the need for wlr_output_attach_buffer to return a value, and for wlr_output_impl.attach_buffer.
2020-04-08output: introduce wlr_output_testSimon Ser
2020-04-02buffer: add width and heightSimon Ser
2020-04-02buffer: add a release eventSimon Ser
Consumers call wlr_buffer_lock. Once all consumers are done with the buffer, only the producer should have a reference to the buffer. In this case, we can release the buffer (and let the producer re-use it).
2020-04-02buffer: add destroy eventSimon Ser
2020-03-29Gracefully handle inert wl_output resourcesSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/2088
2020-03-25Prevent memory leak in copypaste of the screencopy exampleRabit
If someone want to use screencopy as is processing multiple screenshots - it could be hard to find this issue with shm.
2020-03-24build: Add 'auto' to logind-provider combo optionScott Moreau
The logind provider defaulted to systemd and in order to use elogind, -Dlogin-provider=elogind was required. This adds 'auto' as a choice for the login-provider option and sets it as default. Using 'auto', the build will check for systemd first and if it's not found, try to find and use elogind automatically.
2020-03-24Return false on wlr_keyboard_set_keymap() failureIsaac Freund
This allows users of the library to handle or ignore the error as they see fit.
2020-03-23Return failure of wlr_renderer_init_wl_display()Isaac Freund
This makes it easier for the user of this library to properly handle failure of this function. The signature of wlr_renderer_impl.init_wl_display was also modified to allow for proper error propagation.
2020-03-21wlr_surface: Post error if multiple role objects createdScott Anderson
This fixes an assertion failure if a client tries to do this, e.g. by creating multiple toplevel objects for the same surface. If the same role data is set multiple times, this does not cause an error, which is how cursors use this interface.
2020-03-17backend/wayland: close keymap FDSimon Ser
We don't actually need the keymap. We need to close the FD or we will run out of FDs.
2020-03-15Fix uint32 overflow in fill_empty_gamma_table on Icelake platformFilip Sandborg
Closes: https://github.com/swaywm/sway/issues/4826