Commit graph

3381 commits

Author SHA1 Message Date
emersion
09550032b7
render: correctly set EGL_RENDERABLE_TYPE
This should be set to EGL_OPENGL_ES2_BIT.

Also fixes EGL config attributes in the headless and X11 backends.
2018-11-10 13:20:54 +01:00
Drew DeVault
ca570fa63c
Merge pull request #1364 from ManDay/master
Tell Mesa not to attempt X11 headers
2018-11-09 15:45:26 -05:00
Cedric Sodhi
beefec3326 Tell Mesa not to attempt X11 headers
If no X11 related things are being built, tell Mesa's eglplatform.h not to attempt inclusion of associated X11 header.
2018-11-09 21:25:23 +01:00
emersion
e70a552203
Merge pull request #1361 from sghctoma/fix-shm
Force ftruncate for shared memory objects on FreeBSD
2018-11-09 19:34:42 +01:00
sghctoma
753540335b Remove WLR_HAS_POSIX_FALLOCATE from build system 2018-11-09 18:48:10 +01:00
sghctoma
bc5e84225c Use ftruncate to set shared memory object's size
The posix_fallocate function should only be used with regular files.
2018-11-09 18:29:19 +01:00
emersion
0b5485cf83
Merge pull request #1362 from julio641742/patch-1
Fix compilation error on musl
2018-11-09 08:01:36 +01:00
Julio Galvan
a31fa678e5
Fix compilation error on musl
_XOPEN_SOURCE is needed for the strings.h ffs function on the musl libc implementation
2018-11-09 04:27:06 +00:00
sghctoma
b25e230df8 Force ftruncate for shared mem. objects on FreeBSD
FreeBSD does not allow to use posix_fallocate on shared memory objects.
2018-11-08 13:48:21 +01:00
Drew DeVault
bcd19a8824
Merge pull request #1358 from emersion/xcursor-heap
xcursor: Fix heap overflows when parsing malicious files
2018-11-06 09:24:25 -05:00
Tobias Stoeckmann
de0a032d8e
xcursor: Fix heap overflows when parsing malicious files
It is possible to trigger heap overflows due to an integer overflow
while parsing images.

The integer overflow occurs because the chosen limit 0x10000 for
dimensions is too large for 32 bit systems, because each pixel takes
4 bytes. Properly chosen values allow an overflow which in turn will
lead to less allocated memory than needed for subsequent reads.

See also:
https://cgit.freedesktop.org/xorg/lib/libXcursor/commit/?id=4794b5dd34688158fb51a2943032569d3780c4b8
5d201df72f
2018-11-06 14:40:41 +01:00
Drew DeVault
2bf482e90f
Merge pull request #1357 from emersion/xopen-source
Use _POSIX_C_SOURCE, use shm_open
2018-11-06 12:46:29 +01:00
emersion
a8bc8c65ce
examples: only link clients to wlroots if necessary 2018-11-06 08:29:30 +01:00
emersion
2d0c5ec78e
Use _POSIX_C_SOURCE, use shm_open 2018-11-06 08:29:23 +01:00
Drew DeVault
d7b010024a
Merge pull request #1261 from arandomhuman/damage-control
Fix damage tracking for surfaces with transforms
2018-11-04 14:31:17 +01:00
Drew DeVault
cb503973ce
Merge pull request #1350 from emersion/check-gles2-bgra-ext
render/gles2: remove assumptions about supported formats
2018-11-04 14:30:16 +01:00
emersion
dec303bea6
surface: fix wlr_surface_get_effective_damage to give surface coords
Transforms were applied, but scale wasn't.
2018-11-04 11:13:10 +01:00
emersion
d592dcdedd
render/gles2: check for GL_OES_EGL_image_external 2018-11-04 09:00:55 +01:00
emersion
b5125ff328
backend/drm: specify minimum config attributes
Since the format used by DRM is GBM_FORMAT_ARGB8888, we need at least a R, G, B
and A channel.
2018-11-04 09:00:55 +01:00
emersion
62d646f2b8
render/gles2: remove assumptions about supported formats
We were assuming GL_BGRA_EXT was always supported.

We now check that it's supported for rendering. We fail if it isn't because
this format is specified as "always supported" by the Wayland protocol.

We also check if it's supported for reading pixels. A new preferred_read_format
function returns the preferred format that can be used to read pixels. This is
used by the screencopy protocol.
2018-11-04 09:00:51 +01:00
Drew DeVault
675cf8457e
Merge pull request #1341 from emersion/view-at-unmapped
rootston: fix segfault in view_at
2018-11-01 21:52:48 +01:00
Drew DeVault
70ca7daeb2
Merge pull request #1346 from emersion/fix-schedule-frame-mgpu
backend/drm: fix frame scheduling on secondary GPUs
2018-10-30 01:59:25 +01:00
emersion
11dc1f65d2
Merge pull request #1344 from emersion/no-atomic-gamma
backend/drm: add WLR_DRM_NO_ATOMIC_GAMMA env variable
2018-10-29 22:22:40 +01:00
emersion
68362b37a8
backend/drm: fix frame scheduling on secondary GPUs
There was a missing copy_drm_surface_mgpu call in drm_connector_schedule_frame
so we asked for a pageflip with an unknown BO, resulting in ENOENT.

Additionally, this commit makes schedule_frame return a bool indicating
failures. This allows schedule_frame_handle_idle_timer to only set
frame_pending to true if a frame has been successfully scheduled. Thus, if a
pageflip fails, rendering won't be blocked forever anymore.

In case a pageflip is already pending, true is returned because a frame has
already been scheduled and will be sent sometime soon.
2018-10-29 20:38:57 +01:00
emersion
443a38bd3f
backend/drm: add WLR_DRM_NO_ATOMIC_GAMMA env variable
This allows the legacy interface to be used instead of atomic if needed. This
is a workaround to make some Intel GPUs work (if this variable is unset) as
well as to make some AMD GPUs work (if this variable is set).
2018-10-28 23:43:21 +01:00
emersion
0c7371221c
rootston: fix segfault when destroying unmapped fullscreen views 2018-10-28 23:15:36 +01:00
emersion
1454d1c8f8
rootston: fix segfault in view_at
Make sure the view is mapped.
2018-10-28 23:14:39 +01:00
Drew DeVault
659d39baaa
Merge pull request #1332 from emersion/shm-open
util: use shm_open for in-memory files
2018-10-28 23:05:21 +01:00
emersion
54e78e9e26
xwayland: don't fail if XDG_RUNTIME_DIR is not set
We don't require it, Xwayland doesn't require it, and all X11 apps I tried
don't need it.
2018-10-28 22:39:57 +01:00
emersion
346ec21c4c
util: use shm_open for in-memory files
shm_open is a POSIX function creating an in-memory file. Using it simplifies
the code and removes the dependency on XDG_RUNTIME_DIR. The only downside is
that we need to generate a random name for the shm file.
2018-10-28 22:39:54 +01:00
Drew DeVault
f668e49fae
Merge pull request #1340 from emersion/fix-input-method-destroy
input-method-v2: initialize destroy signal
2018-10-28 12:56:53 +01:00
Drew DeVault
e3ec1be941
Merge pull request #1338 from emersion/wayland-swap-interval
render: on Wayland, make eglSwapBuffers non-blocking
2018-10-28 12:33:59 +01:00
emersion
de8d87f5ae
input-method-v2: initialize destroy signal 2018-10-28 12:23:47 +01:00
emersion
2ae2c247a0
Merge pull request #1339 from MrSorcus/master
Fix "variable ‘cursor_default’ set but not used"
2018-10-28 12:19:17 +01:00
Sorcus
7c540aa9fe Fix "variable ‘cursor_default’ set but not used" 2018-10-28 10:58:13 +00:00
emersion
fe247e20a3
Merge pull request #1337 from emersion/idle-zero-timeout
idle: allow zero timeout
2018-10-28 11:21:14 +01:00
emersion
b42fc4f2b1
render: on Wayland, make eglSwapBuffers non-blocking 2018-10-28 09:58:20 +01:00
emersion
3cb4ff3ff1
idle: allow zero timeout
Prior to this commit, setting up a zero timeout resulted in a timer that never
expires, which isn't particularly useful.

This commit allows setting up timers that expire immediately, which is useful
to immediately enter idle state.
2018-10-28 09:22:12 +01:00
emersion
f34b7f8800
Merge pull request #1336 from swaywm/freebsd
Add FreeBSD build
2018-10-27 19:32:44 +02:00
Drew DeVault
320d5ea234 Add FreeBSD build 2018-10-27 10:33:27 -04:00
Ryan Dwyer
266b3df678
Merge pull request #1335 from emersion/fucking-transparency
xwayland: fix typo to enable transparency
2018-10-27 20:20:32 +10:00
emersion
f745befc06
xwayland: fix typo to enable transparency
We spent literally hours trying to debug this. Turns out it's a typo.

Kill me.
2018-10-27 11:59:27 +02:00
Drew DeVault
c55d1542fe
Merge pull request #1327 from RyanDwyer/xwm-unset-minmax-hints
xwm: Unset min/max size hints if they're not used
2018-10-22 14:51:06 +02:00
Ryan Dwyer
bc52de031e xwm: Unset min/max size hints if they're not used 2018-10-22 21:49:17 +10:00
Drew DeVault
6c7e0e48b1
Merge pull request #1289 from ixru/fix-cursor-visibility
Fix cursor visibility on surface commit
2018-10-21 19:19:02 +02:00
Drew DeVault
e0cf97da69
Merge pull request #1307 from emersion/static-analysis
Fix a few bugs found by the static analyzer
2018-10-21 19:18:39 +02:00
emersion
be6210cf82
Update version to 0.1 2018-10-21 00:17:22 +02:00
emersion
9e060be04b
Merge pull request #1320 from emersion/fix-duplicate-cursors
output-layout, cursor: fix duplicate cursors
2018-10-19 15:27:58 +02:00
emersion
d88fffa5c4
Merge pull request #1321 from RyanDwyer/xwm-remove-dangling-parent
xwm: Remove child->parent pointer when parent destroys
2018-10-19 15:27:20 +02:00
Ryan Dwyer
5c5296c912 xwm: Remove child->parent pointer when parent destroys 2018-10-19 23:03:58 +10:00