Commit graph

4921 commits

Author SHA1 Message Date
Andri Yngvason
2a63f4fc61 protocol/screencopy: Add damage reporting 2019-10-22 10:41:32 -04:00
Andri Yngvason
5d8bd4d343 output: Add commit sequence number
This allows synchronisation between different instances of commit/precommit
callbacks.
2019-10-22 10:41:32 -04:00
Ferdinand Bachmann
d113e48a2a Add missing include required by mesa and libglvnd change
eglext.h no longer inludes eglmesaext.h, include it within wlroots
explicitly.

Fixes #1862
2019-10-19 10:50:19 -04:00
Simon Ser
02d664b37f protocol: sync layer-shell with upstream
Fixes this warning:

    ../protocol/wlr-layer-shell-unstable-v1.xml:241: warning: since version not increasing
2019-10-17 09:12:33 -04:00
Timidger
1724261910 layer_shell: set layer of existing surface 2019-10-16 09:41:13 -04:00
Simon Ser
6bb7639a0f render/gles2: don't unset the current EGL surface when destroying texture
When a texture is destroyed between wlr_egl_make_current and
wlr_egl_swap_buffers, it resets the current EGL surface to NULL. This
makes wlr_egl_swap_buffers fail.

If the EGL context is already current, there's no need to reset it.
2019-10-16 09:40:26 -04:00
Simon Ser
5bddb5a909 backend/wayland: add support for direct scan-out
Closes: https://github.com/swaywm/wlroots/issues/1830
2019-10-16 09:40:26 -04:00
Ivan Molodetskikh
cbb2781fed output: add block_idle_frame 2019-10-16 09:35:07 -04:00
Danilo Spinella
41cbb80e25 Add new define EGL_NO_X11 for newer mesa library
Define both MESA_EGL_NO_X11_HEADERS and EGL_NO_X11 for
backward combatibility.
2019-10-16 16:29:25 +03:00
Simon Ser
21b75e5d12 build: simplify by using disabler deps 2019-10-16 09:01:27 -04:00
Ilia Bozhinov
480a31ea4e wlr_box: properly calculate closest point for non-positive area boxes
If box->width/height is <= 0, the box doesn't contain any points, and so
there is no closest point. wlr_box_closest_point should return NAN in this
case.

In addition, we need to handle empty boxes in a few other
output-layout-related places, because outputs can have size 0x0 when
they are created or destroyed.
2019-10-11 23:43:13 +03:00
Simon Ser
2bdd1d0896 backend/drm: use modifiers for our GBM buffers 2019-10-11 08:11:48 -04:00
Simon Ser
11bf87d678 render/egl: support formats with zero modifiers 2019-10-11 08:09:08 -04:00
Scott Moreau
3b4824a2fe xwayland: Expose configure request mask
Without this information, compositors have no way to tell whether
or not to consider the position information valid. Most notably,
a compositor needs to know if it should pick a position for the
surface or use the position sent in the configure request.
2019-10-08 19:46:06 +03:00
Simon Ser
9796abcced build: workaround for meson disabler object not working with if not 2019-10-08 12:42:18 -04:00
Drew DeVault
b051bb68c2 Update version to 0.8.1 2019-10-07 15:28:20 -04:00
amingin
b1b93c2c7e Fixes crash of compositor when unvalidated keycode 0 is passed (#1833)
* Fixes crash of compositor when unvalidated keycode 0 is passed from virtual keyboard

* Style fix
2019-09-27 13:11:30 +03:00
Ivan Molodetskikh
5f78ea20fa drm: use IMPORT_FD for INVALID modifier
GBM_BO_IMPORT_FD_MODIFIER doesn't accept the INVALID modifier.
2019-09-26 23:26:40 +03:00
Markus Ongyerth
ebeef0fbe8 Clean up wayland backend tablet support
Mostly address feedback from emersion on PR #1694
Remove const qualifier from char *name, to allow free() call
2019-09-26 19:41:19 +03:00
Markus Ongyerth
2285e36b0c Add zwp-tablet-unstable-v2 client support
This allows wlroots based compositors to properly use graphic tablets
with the wayland backend.
This should be a decent quality of life improvement when working on
tablet related features.
2019-09-26 19:41:19 +03:00
Markus Ongyerth
57babd2e13 Move initialization of wlr_tablet_pad into types/wlr_tablet_pad 2019-09-26 19:41:19 +03:00
Ivan Molodetskikh
020a33e057 presentation_feedback: add the sampled state 2019-09-19 19:44:19 +03:00
Simon Ser
c808613287 compositor: disconnect client on OOM in create_surface 2019-09-18 11:28:15 +12:00
Versus Void
2ecfc46b93 xdg-output: send wl_output.done after xdg_output created
xdg-output version 3 requires to send wl_output.done
"after all xdg_output properties have been sent when the object is created"
2019-09-17 15:30:20 +03:00
Scott Anderson
06644575da render/egl: Change KHR_debug log to include error code 2019-09-15 10:06:34 +03:00
Sebastian Krzyszkowiak
a14d650864 wlr_seat_touch: Destroy the touchpoint on client destroy
Since e26217c51e3a5e1d7dfc95a8a76299e056497981, touchpoints can outlive
surfaces. This works fine as long as the client stays around, but fails
horribly otherwise; therefore we have to make sure that touchpoints don't
outlive their clients.

Fixes #1788
2019-09-14 16:19:07 +03:00
Ilia Bozhinov
8b0f1bc850 layer-shell: ignore ack_configure() on closed surfaces
When the surface is closed, we destroy all pending serials waiting to be
accepted. This means we need to ignore any future ack events, because we
can have the following events:

1. -> configure()
2. -> close()
3. <- ack_configure()

At point 3, wlroots will error the client because of invalid serial,
however the client hasn't processed close() yet.
2019-09-13 13:58:58 +03:00
Rouven Czerwinski
bf90474b74 backend/drm: check for mst: in path property
Instead of checking that the path property is not 0 to determine if the
connector is an MST connector, check if the path contains the mst:
string.

Fixes #1813
2019-09-05 10:25:12 +03:00
Filip Sandborg
734c64a6cc render/gles2: fix calculation for partial gles2 pixel read (#1809) 2019-08-31 23:00:52 +03:00
Drew DeVault
a20bb38763 Update version to 0.7.0 2019-08-27 12:32:24 +09:00
Drew DeVault
bd6b348feb Add _incr_version to contrib/ 2019-08-27 12:28:37 +09:00
Sebastian Krzyszkowiak
cdfe836b03 Revert "wlr_xdg_popup: don't treat all surfaces of grabbing client as grabbing surfaces"
This reverts commit 52037d13f7.

Fixes #1801
2019-08-27 11:12:09 +09:00
Brian Ashworth
fa477c77c4 wlr-layer-shell-v1: destroy xdg popups on unmap
This destroys the xdg popups associated with a layer surface when the
layer surface is unmapped. It does not make sense to keep the popups
open when unmapped.
2019-08-24 13:39:38 +09:00
Andri Yngvason
e19f48d1e4 backend: touch: Fixup incomplete patch for single touch devices.
All instances of libinput_event_touch_get_slot need to be converted to
libinput_event_touch_get_seat_slot for things to work.
2019-08-19 17:35:30 +03:00
Andri Yngvason
4f4d3cf2a2 backend: touch: Assign good ids to single touch devices
libinput_event_touch_get_slot always returns -1 for single touch devices. Using
libinput_event_touch_get_seat_slot instead ensures that they are assigned actual
slot ids.

Also, this is what Weston does, so this change yields a more consistent
behaviour between different compositors.
2019-08-15 18:46:54 +03:00
Brian Ashworth
9914784594 wlr_xdg_toplevel: reparent on parent unmap
From the xdg-shell specification:
	If the parent is unmapped then its children are managed as
	though the parent of the now-unmapped parent has become the
	parent of this surface. If no parent exists for the now-unmapped
	parent then the children are managed as though they have no
	parent surface.
2019-08-15 11:19:06 +03:00
Simon Ser
8d2ea9544b backend/drm: fix missing plane formats
The loop populating the format list was exiting early if ARGB8888 was found.
2019-08-15 12:33:42 +12:00
Drew DeVault
540e23d102 Revert "render/drm: keep old drm_format if realloc fails"
This reverts commit c1be9b6945.
2019-08-12 19:53:39 +09:00
Antonin Décimo
82f48b8912 examples: remove duplicated condition 2019-08-12 09:37:21 +09:00
Antonin Décimo
8d5f27ef25 xwayland: prevent possible array overrun 2019-08-12 09:37:21 +09:00
Antonin Décimo
e7f1aa30dd backend/wayland: check if zxdg_toplevel_decoration_v1 is not NULL 2019-08-12 09:37:21 +09:00
Antonin Décimo
217cf18a4b Avoid loss of a fractional part 2019-08-12 09:37:21 +09:00
Antonin Décimo
39c5d93dea backend/drm: use UINT64_C for uint64_t literals
Prevents an integer promotion bug during the byte-shift.
2019-08-12 09:37:21 +09:00
Antonin Décimo
68b4a5305e backend/session: non-void function should return a value
With assertions disabled, it should make sense to return NULL.
2019-08-12 09:37:21 +09:00
Antonin Décimo
0695324de7 xdg_shell: remove variable self-assignment 2019-08-12 09:37:21 +09:00
Antonin Décimo
8f3d73e3a3 wlr_surface: condition is always false 2019-08-12 09:37:21 +09:00
Antonin Décimo
b400c26b23 Simplify check 2019-08-12 09:37:21 +09:00
Antonin Décimo
3fc977d7da Fix memory leak 2019-08-12 09:37:21 +09:00
Antonin Décimo
820800a5ab xcursor: avoid leak and loss of all cursors if cursors realloc fails 2019-08-12 09:37:21 +09:00
Antonin Décimo
c1be9b6945 render/drm: keep old drm_format if realloc fails 2019-08-12 09:37:21 +09:00