Commits:
-
2bd43be9
by Konstantin at 2023-10-12T09:38:17+02:00
glamor: fixes GL_INVALID_ENUM errors on ES if there is no quads
If there is no quads to draw, then we have a possibility to call
glDrawElements with type as zero, which will generate
GL_INVALID_ENUM error. While this error is harmless, it is annoying.
Signed-off-by: Konstantin <ria.freelander@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit baaddf47d593b51d215d836a796b95a3cb14a220)
-
c9a842e6
by Michel Dänzer at 2023-10-12T09:38:52+02:00
xwayland/present: Handle NULL window_priv in xwl_present_cleanup
This can happen if the window has never completed a Present operation.
Fixes: 42301760802e ("xwayland/present: Embed present_vblank_rec in xwl_present_event")
(cherry picked from commit 32c5b2c044604c5b1039035fd1f320c33988a2e3)
-
4f8e209d
by José Expósito at 2023-10-12T09:39:31+02:00
xwayland/glamor/gbm: Set GBM_BO_USE_LINEAR if only LINEAR modifier is supported
Some drivers might not support explicit format modifiers. On these
drivers `gbm_bo_create_with_modifiers()` will fail and the
`gbm_bo_create()` code path will be used instead.
In this case, if the LINEAR modifier is advertised (and the INVALID
modifier is not) add the `GBM_BO_USE_LINEAR` flag.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1438
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito's avatarJosé Expósito <jexposit@redhat.com>
(cherry picked from commit 287638db59d0938ceb263fcef1bf0c28eefb2033)
-
10353a01
by Olivier Fourdan at 2023-10-12T09:39:37+02:00
xwayland: Add an option to enable EI portal support
With EI support wired to XTEST, and oeffis being enabled unconditionally
means that Xwayland will always go through the XDG portal for XTEST when
supported.
While this the intended behavior for the general use case of Xwayland
running rootless on a desktop compositor, that breaks when Xwayland is
running on a nested compositor, because the portal is for the entire
session and not limited to the nested Wayland compositor.
Xwayland itself, as a regular Wayland client, has no way to tell that it
is running on a nested compositor.
So to keep backward compatibility with existing (and also common) use
cases such as nested compositors, best is to disable support for the XDG
portal by default, and add a new command line option "-enable-ei-portal"
for the Wayland compositors (who spawn Xwayland rootless) to explicitly
enable support for the input emulation XDG portal in Xwayland.
A Wayland compositor running nested should not use that command line
option with Xwayland.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Fixes: a1333342 - xwayland: Add XTEST support using EIS
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1586
See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/3047
(cherry picked from commit cfcbb075c23fc668e84a381c9c2c165a95798cf4)
-
07c18c90
by Olivier Fourdan at 2023-10-12T09:39:41+02:00
xwayland: Give up on EI on setup failure
If we fail to setup EI, give up on using EI for XTEST and restore the
default XTEST handlers.
This happens when neither the portal nor the socket backends are usable.
This does not affect the portal operation though, if the user choose not
to allow a particular client, Xwayland would continue to use EI.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
(cherry picked from commit 6b56ae68e5476bdda00a6c5f4e2311a13b3d12cc)
-
cc79b2a8
by Jeffy Chen at 2023-10-12T09:39:54+02:00
glamor: xv: Fix invalid accessing of plane attributes for NV12
NV12 only has 2 planes.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
(cherry picked from commit 0076671e24670f1ddb151946e490497f171589f0)
-
4f8a851b
by Olivier Fourdan at 2023-10-12T09:40:04+02:00
xwayland: Cancel the EI disconnect timer when freed
Xwayland maintains a connection to EI up for 10 minutes after an X11
client has vanished, to avoid going through the connection phase every
time a short lived X11 client comes and goes.
However, if the EI client gets freed (through some other event, e.g. the
user decides to terminate the EI session), Xwayland would still keep the
callback alive and end up trying to free an already freed EI client:
Invalid read of size 4
at 0x4C5E6F9: object_unref (util-object.h:89)
by 0x4C5E6F9: ei_unref (libei.c:77)
by 0x429525: free_ei (xwayland-xtest.c:224)
by 0x429A6E: disconnect_timer_cb (xwayland-xtest.c:404)
by 0x5E63FF: DoTimer (WaitFor.c:276)
by 0x5E6463: DoTimers (WaitFor.c:290)
by 0x5E6164: check_timers (WaitFor.c:133)
by 0x5E61E9: WaitForSomething (WaitFor.c:195)
by 0x4AD50E: Dispatch (dispatch.c:487)
by 0x4BBA0B: dix_main (main.c:272)
by 0x43615D: main (stubmain.c:34)
Address 0x15cc6ee8 is 8 bytes inside a block of size 240 free'd
at 0x48452AC: free (vg_replace_malloc.c:974)
by 0x4C5E729: object_destroy (util-object.h:73)
by 0x4C5E729: object_unref (util-object.h:91)
by 0x4C5E729: ei_unref (libei.c:77)
by 0x429525: free_ei (xwayland-xtest.c:224)
by 0x42A946: xwl_handle_ei_event (xwayland-xtest.c:804)
by 0x5EA977: HandleNotifyFd (connection.c:809)
by 0x5EE8E3: ospoll_wait (ospoll.c:657)
by 0x5E624D: WaitForSomething (WaitFor.c:208)
by 0x4AD50E: Dispatch (dispatch.c:487)
by 0x4BBA0B: dix_main (main.c:272)
by 0x43615D: main (stubmain.c:34)
Block was alloc'd at
at 0x484782C: calloc (vg_replace_malloc.c:1554)
by 0x4C5E777: ei_create (libei.c:73)
by 0x4C5E777: ei_create_context (libei.c:97)
by 0x42994B: setup_ei (xwayland-xtest.c:366)
by 0x42A383: xwayland_xtest_send_events (xwayland-xtest.c:658)
by 0x54ED4C: ProcXTestFakeInput (xtest.c:441)
by 0x54EE56: ProcXTestDispatch (xtest.c:475)
by 0x4AD6E6: Dispatch (dispatch.c:546)
by 0x4BBA0B: dix_main (main.c:272)
by 0x43615D: main (stubmain.c:34)
To avoid that issue, make sure to cancel the timer as soon as a EI
client is freed.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
See-also: https://bugzilla.redhat.com/2243076
(cherry picked from commit 9617de733becb04f547191570978dcbc449bb11e)
-
829a9911
by Sam James at 2023-10-23T23:45:09-04:00
Switch to libbsd-overlay
This is more portable than libbsd as everything Just Works, even on BSD systems,
and is the recommended method of consuming libbsd nowadays.
It also helpfully lets things work with glibc-provided functions for new
enough glibc.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/973
Co-authored-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 94945a52746ee2612c6cd394692f49e2ed5fc56b)
-
1e847845
by Peter Hutterer at 2023-10-25T11:49:11+10:00
Xi/randr: fix handling of PropModeAppend/Prepend
The handling of appending/prepending properties was incorrect, with at
least two bugs: the property length was set to the length of the new
part only, i.e. appending or prepending N elements to a property with P
existing elements always resulted in the property having N elements
instead of N + P.
Second, when pre-pending a value to a property, the offset for the old
values was incorrect, leaving the new property with potentially
uninitalized values and/or resulting in OOB memory writes.
For example, prepending a 3 element value to a 5 element property would
result in this 8 value array:
[N, N, N, ?, ?, P, P, P ] P, P
^OOB write
The XI2 code is a copy/paste of the RandR code, so the bug exists in
both.
CVE-2023-5367, ZDI-CAN-22153
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 541ab2ecd41d4d8689e71855d93e492bc554719a)
-
e4487cae
by Peter Hutterer at 2023-10-25T11:52:55+10:00
Bump version to 23.2.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 changed files:
Changes:
Xi/xiproperty.c
... |
... |
@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, |
730
|
730
|
XIDestroyDeviceProperty(prop);
|
731
|
731
|
return BadAlloc;
|
732
|
732
|
}
|
733
|
|
- new_value.size = len;
|
|
733
|
+ new_value.size = total_len;
|
734
|
734
|
new_value.type = type;
|
735
|
735
|
new_value.format = format;
|
736
|
736
|
|
... |
... |
@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, |
747
|
747
|
case PropModePrepend:
|
748
|
748
|
new_data = new_value.data;
|
749
|
749
|
old_data = (void *) (((char *) new_value.data) +
|
750
|
|
- (prop_value->size * size_in_bytes));
|
|
750
|
+ (len * size_in_bytes));
|
751
|
751
|
break;
|
752
|
752
|
}
|
753
|
753
|
if (new_data)
|
glamor/glamor.c
... |
... |
@@ -307,6 +307,10 @@ glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv, |
307
|
307
|
{
|
308
|
308
|
unsigned i;
|
309
|
309
|
|
|
310
|
+ /* If there is no quads to draw, just exit */
|
|
311
|
+ if (count == 0)
|
|
312
|
+ return;
|
|
313
|
+
|
310
|
314
|
/* For a single quad, don't bother with an index buffer. */
|
311
|
315
|
if (count == 1)
|
312
|
316
|
goto fallback;
|
glamor/glamor_xv.c
... |
... |
@@ -291,10 +291,10 @@ glamor_xv_query_image_attributes(int id, |
291
|
291
|
pitches[0] = size;
|
292
|
292
|
size *= *h;
|
293
|
293
|
if (offsets)
|
294
|
|
- offsets[1] = offsets[2] = size;
|
|
294
|
+ offsets[1] = size;
|
295
|
295
|
tmp = ALIGN(*w, 4);
|
296
|
296
|
if (pitches)
|
297
|
|
- pitches[1] = pitches[2] = tmp;
|
|
297
|
+ pitches[1] = tmp;
|
298
|
298
|
tmp *= (*h >> 1);
|
299
|
299
|
size += tmp;
|
300
|
300
|
break;
|
hw/xwayland/man/Xwayland.man
... |
... |
@@ -61,6 +61,15 @@ backend first, then fallback to the GBM backend if EGLStream is not supported |
61
|
61
|
by the Wayland server. Without this option, \fIXwayland\fP tries the GBM
|
62
|
62
|
backend first, and fallback to EGLStream if GBM is not usable.
|
63
|
63
|
.TP 8
|
|
64
|
+.B \-enable-ei-portal
|
|
65
|
+Enable support for the XDG portal for input emulation.
|
|
66
|
+
|
|
67
|
+A Wayland compositor running nested should not use that command line
|
|
68
|
+option with Xwayland.
|
|
69
|
+
|
|
70
|
+This option has no effect if the compositor doesn't support the relevant
|
|
71
|
+XDG portal or if Xwayland was not compiled with EI and OEFFIS support.
|
|
72
|
+.TP 8
|
64
|
73
|
.B \-fullscreen
|
65
|
74
|
Set the Xwayland window fullscreen when running rootful.
|
66
|
75
|
|
hw/xwayland/meson.build
... |
... |
@@ -186,6 +186,7 @@ xwayland_vars = [ |
186
|
186
|
'have_fullscreen=true',
|
187
|
187
|
'have_host_grab=true',
|
188
|
188
|
'have_decorate=' + have_libdecor.to_string(),
|
|
189
|
+ 'have_enable_ei_portal=' + build_ei_portal.to_string(),
|
189
|
190
|
'have_byteswappedclients=true',
|
190
|
191
|
]
|
191
|
192
|
|
hw/xwayland/xwayland-glamor-gbm.c
... |
... |
@@ -284,6 +284,8 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen, |
284
|
284
|
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
|
285
|
285
|
struct gbm_bo *bo = NULL;
|
286
|
286
|
PixmapPtr pixmap = NULL;
|
|
287
|
+ uint32_t num_modifiers = 0;
|
|
288
|
+ uint64_t *modifiers = NULL;
|
287
|
289
|
|
288
|
290
|
if (width > 0 && height > 0 && depth >= 15 &&
|
289
|
291
|
(hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
|
... |
... |
@@ -294,8 +296,6 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen, |
294
|
296
|
|
295
|
297
|
#ifdef GBM_BO_WITH_MODIFIERS
|
296
|
298
|
if (xwl_gbm->dmabuf_capable) {
|
297
|
|
- uint32_t num_modifiers = 0;
|
298
|
|
- uint64_t *modifiers = NULL;
|
299
|
299
|
Bool supports_scanout = FALSE;
|
300
|
300
|
|
301
|
301
|
if (drawable) {
|
... |
... |
@@ -324,7 +324,6 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen, |
324
|
324
|
format, modifiers, num_modifiers);
|
325
|
325
|
#endif
|
326
|
326
|
}
|
327
|
|
- free(modifiers);
|
328
|
327
|
}
|
329
|
328
|
#endif
|
330
|
329
|
if (bo == NULL) {
|
... |
... |
@@ -332,6 +331,22 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen, |
332
|
331
|
implicit = TRUE;
|
333
|
332
|
if (implicit_scanout)
|
334
|
333
|
usage |= GBM_BO_USE_SCANOUT;
|
|
334
|
+
|
|
335
|
+ if (num_modifiers > 0) {
|
|
336
|
+ Bool has_mod_invalid = FALSE, has_mod_linear = FALSE;
|
|
337
|
+ int i;
|
|
338
|
+
|
|
339
|
+ for (i = 0; i < num_modifiers; i++) {
|
|
340
|
+ if (modifiers[i] == DRM_FORMAT_MOD_INVALID)
|
|
341
|
+ has_mod_invalid = TRUE;
|
|
342
|
+ else if (modifiers[i] == DRM_FORMAT_MOD_LINEAR)
|
|
343
|
+ has_mod_linear = TRUE;
|
|
344
|
+ }
|
|
345
|
+
|
|
346
|
+ if (!has_mod_invalid && has_mod_linear)
|
|
347
|
+ usage |= GBM_BO_USE_LINEAR;
|
|
348
|
+ }
|
|
349
|
+
|
335
|
350
|
bo = gbm_bo_create(xwl_gbm->gbm, width, height, format, usage);
|
336
|
351
|
}
|
337
|
352
|
|
... |
... |
@@ -350,6 +365,7 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen, |
350
|
365
|
if (!pixmap)
|
351
|
366
|
pixmap = glamor_create_pixmap(xwl_screen->screen, width, height, depth, hint);
|
352
|
367
|
|
|
368
|
+ free(modifiers);
|
353
|
369
|
return pixmap;
|
354
|
370
|
}
|
355
|
371
|
|
hw/xwayland/xwayland-present.c
... |
... |
@@ -414,9 +414,11 @@ xwl_present_cleanup(WindowPtr window) |
414
|
414
|
xwl_present_window->sync_callback = NULL;
|
415
|
415
|
}
|
416
|
416
|
|
417
|
|
- /* Clear remaining events */
|
418
|
|
- xorg_list_for_each_entry_safe(event, tmp, &window_priv->vblank, vblank.window_list)
|
419
|
|
- xwl_present_free_event(event);
|
|
417
|
+ if (window_priv) {
|
|
418
|
+ /* Clear remaining events */
|
|
419
|
+ xorg_list_for_each_entry_safe(event, tmp, &window_priv->vblank, vblank.window_list)
|
|
420
|
+ xwl_present_free_event(event);
|
|
421
|
+ }
|
420
|
422
|
|
421
|
423
|
/* Clear timer */
|
422
|
424
|
xwl_present_free_timer(xwl_present_window);
|
hw/xwayland/xwayland-screen.c
... |
... |
@@ -812,6 +812,13 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) |
812
|
812
|
use_fixed_size = 1;
|
813
|
813
|
#else
|
814
|
814
|
ErrorF("This build does not have libdecor support\n");
|
|
815
|
+#endif
|
|
816
|
+ }
|
|
817
|
+ else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
|
|
818
|
+#ifdef XWL_HAS_EI_PORTAL
|
|
819
|
+ xwl_screen->enable_ei_portal = 1;
|
|
820
|
+#else
|
|
821
|
+ ErrorF("This build does not have XDG portal support\n");
|
815
|
822
|
#endif
|
816
|
823
|
}
|
817
|
824
|
}
|
hw/xwayland/xwayland-screen.h
... |
... |
@@ -67,6 +67,7 @@ struct xwl_screen { |
67
|
67
|
int host_grab;
|
68
|
68
|
int has_grab;
|
69
|
69
|
int decorate;
|
|
70
|
+ int enable_ei_portal;
|
70
|
71
|
|
71
|
72
|
CreateScreenResourcesProcPtr CreateScreenResources;
|
72
|
73
|
CloseScreenProcPtr CloseScreen;
|
hw/xwayland/xwayland-xtest.c
... |
... |
@@ -200,6 +200,7 @@ free_ei(struct xwl_ei_client *xwl_ei_client) |
200
|
200
|
struct xwl_abs_device *abs, *tmp;
|
201
|
201
|
ClientPtr client = xwl_ei_client->client;
|
202
|
202
|
|
|
203
|
+ TimerCancel(xwl_ei_client->disconnect_timer);
|
203
|
204
|
xorg_list_del(&xwl_ei_client->link);
|
204
|
205
|
|
205
|
206
|
debug_ei("Removing EI fd=%d\n", xwl_ei_client->ei_fd);
|
... |
... |
@@ -334,12 +335,14 @@ setup_ei_from_socket(struct xwl_ei_client *xwl_ei_client) |
334
|
335
|
static struct xwl_ei_client *
|
335
|
336
|
setup_ei(ClientPtr client)
|
336
|
337
|
{
|
|
338
|
+ ScreenPtr pScreen = screenInfo.screens[0];
|
337
|
339
|
struct xwl_ei_client *xwl_ei_client = NULL;
|
|
340
|
+ struct xwl_screen *xwl_screen = xwl_screen_get(pScreen);
|
338
|
341
|
struct ei *ei = NULL;
|
339
|
342
|
char buffer[PATH_MAX];
|
340
|
343
|
const char *cmdname;
|
341
|
344
|
char *client_name = NULL;
|
342
|
|
- bool status;
|
|
345
|
+ bool status = false;
|
343
|
346
|
|
344
|
347
|
cmdname = GetClientCmdName(client);
|
345
|
348
|
if (cmdname) {
|
... |
... |
@@ -375,7 +378,8 @@ setup_ei(ClientPtr client) |
375
|
378
|
xorg_list_init(&xwl_ei_client->pending_emulated_events);
|
376
|
379
|
xorg_list_init(&xwl_ei_client->abs_devices);
|
377
|
380
|
|
378
|
|
- status = setup_oeffis(xwl_ei_client);
|
|
381
|
+ if (xwl_screen->enable_ei_portal)
|
|
382
|
+ status = setup_oeffis(xwl_ei_client);
|
379
|
383
|
if (!status)
|
380
|
384
|
status = setup_ei_from_socket(xwl_ei_client);
|
381
|
385
|
|
... |
... |
@@ -384,6 +388,8 @@ setup_ei(ClientPtr client) |
384
|
388
|
xwl_ei_client = NULL;
|
385
|
389
|
ei_unref(ei);
|
386
|
390
|
error_ei("EI setup failed\n");
|
|
391
|
+ /* We failed to setup EI using either backends, give up on EI. */
|
|
392
|
+ xwayland_restore_xtest();
|
387
|
393
|
}
|
388
|
394
|
|
389
|
395
|
out:
|
hw/xwayland/xwayland.c
... |
... |
@@ -109,6 +109,9 @@ ddxUseMsg(void) |
109
|
109
|
#ifdef XWL_HAS_LIBDECOR
|
110
|
110
|
ErrorF("-decorate add decorations to Xwayland when rootful\n");
|
111
|
111
|
#endif
|
|
112
|
+#ifdef XWL_HAS_EI_PORTAL
|
|
113
|
+ ErrorF("-enable-ei-portal use the XDG portal for input emulation\n");
|
|
114
|
+#endif
|
112
|
115
|
}
|
113
|
116
|
|
114
|
117
|
static int init_fd = -1;
|
... |
... |
@@ -246,6 +249,9 @@ ddxProcessArgument(int argc, char *argv[], int i) |
246
|
249
|
else if (strcmp(argv[i], "-decorate") == 0) {
|
247
|
250
|
return 1;
|
248
|
251
|
}
|
|
252
|
+ else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
|
|
253
|
+ return 1;
|
|
254
|
+ }
|
249
|
255
|
|
250
|
256
|
return 0;
|
251
|
257
|
}
|
include/os.h
... |
... |
@@ -50,16 +50,13 @@ SOFTWARE. |
50
|
50
|
#include "misc.h"
|
51
|
51
|
#include <stdarg.h>
|
52
|
52
|
#include <stdint.h>
|
|
53
|
+#if defined(HAVE_REALLOCARRAY)
|
|
54
|
+#include <stdlib.h> /* for reallocarray */
|
|
55
|
+#endif
|
53
|
56
|
#include <string.h>
|
54
|
57
|
#ifdef MONOTONIC_CLOCK
|
55
|
58
|
#include <time.h>
|
56
|
59
|
#endif
|
57
|
|
-#if defined(HAVE_LIBBSD) && defined(HAVE_REALLOCARRAY)
|
58
|
|
-#include <bsd/stdlib.h> /* for reallocarray */
|
59
|
|
-#endif
|
60
|
|
-#if defined(HAVE_LIBBSD) && defined(HAVE_STRLCPY)
|
61
|
|
-#include <bsd/string.h> /* for strlcpy, strlcat */
|
62
|
|
-#endif
|
63
|
60
|
|
64
|
61
|
#define SCREEN_SAVER_ON 0
|
65
|
62
|
#define SCREEN_SAVER_OFF 1
|
meson.build
... |
... |
@@ -3,10 +3,10 @@ project('xwayland', 'c', |
3
|
3
|
'buildtype=debugoptimized',
|
4
|
4
|
'c_std=gnu99',
|
5
|
5
|
],
|
6
|
|
- version: '23.2.1',
|
|
6
|
+ version: '23.2.2',
|
7
|
7
|
meson_version: '>= 0.52.0',
|
8
|
8
|
)
|
9
|
|
-release_date = '2023-09-20'
|
|
9
|
+release_date = '2023-10-25'
|
10
|
10
|
|
11
|
11
|
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
|
12
|
12
|
cc = meson.get_compiler('c')
|
... |
... |
@@ -94,7 +94,7 @@ xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false) |
94
|
94
|
xwaylandproto_dep = dependency('xwaylandproto', version: '>= 1.0', fallback: ['xorgproto', 'ext_xorgproto'], required: false)
|
95
|
95
|
|
96
|
96
|
pixman_dep = dependency('pixman-1')
|
97
|
|
-libbsd_dep = dependency('libbsd', required: false)
|
|
97
|
+libbsd_dep = dependency('libbsd-overlay', required: false)
|
98
|
98
|
xkbcomp_dep = dependency('xkbcomp', required: false)
|
99
|
99
|
xkbfile_dep = dependency('xkbfile')
|
100
|
100
|
xfont2_dep = dependency('xfont2', version: '>= 2.0')
|
os/auth.c
... |
... |
@@ -46,9 +46,7 @@ from The Open Group. |
46
|
46
|
#ifdef WIN32
|
47
|
47
|
#include <X11/Xw32defs.h>
|
48
|
48
|
#endif
|
49
|
|
-#ifdef HAVE_LIBBSD
|
50
|
|
-#include <bsd/stdlib.h> /* for arc4random_buf() */
|
51
|
|
-#endif
|
|
49
|
+#include <stdlib.h> /* for arc4random_buf() */
|
52
|
50
|
|
53
|
51
|
struct protocol {
|
54
|
52
|
unsigned short name_length;
|
randr/rrproperty.c
... |
... |
@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, |
209
|
209
|
RRDestroyOutputProperty(prop);
|
210
|
210
|
return BadAlloc;
|
211
|
211
|
}
|
212
|
|
- new_value.size = len;
|
|
212
|
+ new_value.size = total_len;
|
213
|
213
|
new_value.type = type;
|
214
|
214
|
new_value.format = format;
|
215
|
215
|
|
... |
... |
@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, |
226
|
226
|
case PropModePrepend:
|
227
|
227
|
new_data = new_value.data;
|
228
|
228
|
old_data = (void *) (((char *) new_value.data) +
|
229
|
|
- (prop_value->size * size_in_bytes));
|
|
229
|
+ (len * size_in_bytes));
|
230
|
230
|
break;
|
231
|
231
|
}
|
232
|
232
|
if (new_data)
|
|