- Oct 02, 2024
-
-
Olivier Fourdan authored
Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Part-of: <!1708>
-
- Sep 24, 2024
-
-
Olivier Fourdan authored
RemoveHost() can be called from DisableLocalHost() with a NULL client, but doesn't actually check whether the given client pointer is valid on error and assigns the error value unconditionally, leading to a possible NULL pointer dereference and a crash of the Xserver. To avoid the issue, simply check whether the client pointer is not NULL prior to assign the errorValue. Closes: #1752 See-also: https://bugzilla.redhat.com/2313799 Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 57a446c0) Part-of: <!1702>
-
The install_demo meson_option was added in libdecor/libdecor@7106f5e3 which is in the 0.1.1 tag, but not 0.1.0. If we upgrade the version of meson used in the CI to 1.0.0, then it fails to build libdecor 0.1.0 with: ERROR: Unknown options: "install_demo" Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 32adf434) Part-of: <!1702>
-
https://gitlab.gnome.org/jadahl/libdecor is archived and the README says to use https://gitlab.freedesktop.org/libdecor/libdecor instead. Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit fc8ba244) Part-of: <!1702>
-
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 9c9e1afe) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/devices.c: In function ‘GetPairedDevice’: ../dix/devices.c:2734:15: warning: dereference of NULL ‘dev’ [CWE-476] [-Wanalyzer-null-dereference] 2734 | return dev->spriteInfo? dev->spriteInfo->paired: NULL; | ~~~^~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit e6fc0861) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/resource.c: In function ‘HashResourceID’: ../dix/resource.c:691:44: warning: left shift of negative value [-Wshift-negative-value] 691 | return (id ^ (id >> numBits)) & ~((~0) << numBits); | ^~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 26a7ab09) Part-of: <!1702>
-
No real harm, but clears warning from gcc 14.1: ../dix/property.c: In function ‘ProcListProperties’: ..//dix/property.c:605:27: warning: dereference of NULL ‘temppAtoms’ [CWE-476] [-Wanalyzer-null-dereference] 605 | *temppAtoms++ = pProp->propertyName; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 39f337fd) Part-of: <!1702>
-
It shouldn't matter, since it would have a length of 0, but it clears warnings from gcc 14.1: ../dix/property.c: In function ‘dixChangeWindowProperty’: ../dix/property.c:287:9: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 287 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../dix/property.c:324:13: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 324 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 10cafd0b) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/ptrveloc.c: In function ‘InitPredictableAccelerationScheme’: ../dix/ptrveloc.c:149:9: warning: leak of ‘<unknown>’ [CWE-401] [-Wanalyzer-malloc-leak] 149 | free(vel); | ^~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 462d13c2) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/gc.c: In function ‘CreateScratchGC’: ../dix/gc.c:818:28: warning: dereference of NULL ‘pGC’ [CWE-476] [-Wanalyzer-null-dereference] 818 | pGC->graphicsExposures = FALSE; Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 7ee3a520) Part-of: <!1702>
-
Clears 7 -Wimplicit-fallthrough warnings from gcc 14.1 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 0cb826e3) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/dixfonts.c: In function ‘SetFontPath’: ../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1697 | client->errorValue = bad; | ~~~~~~~~~~~~~~~~~~~^~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 1a86fba0) Part-of: <!1702>
-
Clears warning from gcc 14.1: ../dix/dixfonts.c:1352:15: warning: use of uninitialized value ‘*c.data’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1352 | free(c->data); | ~^~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit d78836a3) Part-of: <!1702>
-
Clears up 12 -Wanalyzer-possible-null-dereference warnings from gcc 14.1 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 25762834) Part-of: <!1702>
-
Olivier Fourdan authored
Commit 96bdc156 added a check for <sys/eventfd.h> to enable DRI3. DragonFly and OpenBSD however rely on epoll-shim for <sys/eventfd.h>, so that must be added as a dependency for the <sys/eventfd.h> check. Fixes: commit 96bdc156 - xwayland: Do not enable DRI3 without eventfd Suggested-by:
Jan Beich <jbeich@freebsd.org> Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 8fe15a60) Part-of: <!1702>
-
Olivier Fourdan authored
DragonFly and OpenBSD rely on epoll-shim for <sys/eventfd>, add a optional dependency to build Xwayland. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 7bcf2bca) Part-of: <!1702>
-
Olivier Fourdan authored
DragonFly and OpenBSD rely on epoll-shim to provide eventfd. Move the check for epoll dependency to the root meson.build script so that we can use that for the <sys/evenfd.h> check as well. This is preparation work for the following commits, no functional change intended at this point. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 673b56e6) Part-of: <!1702>
-
If either the master pointer or keyboard was disabled, the respective GetMaster() call returns NULL, causing a segfault later accessing the deviceid. Fix this by looking in the off_devices list for any master device of the type we're looking for. Master devices lose the pairing when disabled (on enabling a keyboard we simply pair with the first available unpaired pointer). And for readability, split the device we get from the protocol request into a new "dev" variable instead of re-using ptr. Fixes #1611 (cherry picked from commit e7c876ab) Part-of: <!1702>
-
Olivier Fourdan authored
The vidmode extension emulation in Xwayland reports the modeline based on the current mode. To do so, it searches for the mode using `xwl_output_find_mode(-1, -1)` which is supposed to return the current mode, whatever that mode is. With XRandR emulation, in rootless mode, the default value is the mode at index 0. That assumption, however is not true when running rootful. That means that the vidmode extension will always return the highest mode available, which is 5120x2880, with Xwayland running rootful: $ xwayland-run -geometry 1024x768 -- xvidtune -show "5120x2880" 1276.50 5120 5560 6128 7136 2880 2883 2888 2982 -hsync +vsync Luckily, when Xwayland is running rootful, we have the current mode size conveniently stored in dedicated fields of the xwayland output struct, so we can use that to search for the right mode being used and report that through the vidmode extension: $ xwayland-run -geometry 1024x768 -- xvidtune -show "1024x768" 63.50 1024 1064 1176 1328 768 771 775 798 -hsync +vsync That fixes legacy games using the vidmode extension and rendering at the wrong size when running within Xwayland rootful. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit e2e58424) Part-of: <!1702>
- Aug 07, 2024
-
-
Olivier Fourdan authored
Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Part-of: <!1638>
-
- Aug 06, 2024
-
-
The code here assumed a `leave` event always occurs between two `enter` events. On Sway (and presumably other compositors) this happens even if the client has destroyed the `wl_surface`, but the client gets a null `surface` here. (Which presumably on on the wire is the id of the destroyed surface.) This seems like a bad thing to rely on, and is easy to avoid. But if this is correct to assume, the Wayland protocol should be explicit about this. (cherry picked from commit 386b54fb) Part-of: <!1635>
-
Olivier Fourdan authored
Now that we won't enable DRI3 if <sys/eventfd.h> is not available, there is not point in trying to include that header without DRI3. That allows to build Xwayland with GLAMOR enabled (without DRI3) on platforms which do not support eventfd. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 23c295ea) Part-of: <!1635>
-
Olivier Fourdan authored
DRI3 version 1.4 which supports explicit buffers synchronization relies on the eventfd interface. As result, building would fail with DRI3 enabled on platforms without the eventfd interface. Check for the availability of the sys/eventfd.h header and disable DRI3 support if missing. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 96bdc156) Part-of: <!1635>
-
Olivier Fourdan authored
Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Closes: #1668 (cherry picked from commit a58352b9) Part-of: <!1635>
-
This rewrites the shader so that we use the same (more flexible) CSC as we have for I420 and NV12. This also fixes the reverse of odd/even which caused chroma shift. Signed-off-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> (cherry picked from commit 39c8a6f3) Part-of: <!1635>
-
UYVY videos should be aligned by 2 to avoid breakups in the shader Fixes: 832b392f - glamor: xv: enable UYVY acceleration Suggested-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Konstantin <ria.freelander@gmail.com> (cherry picked from commit eb26f323) Part-of: <!1635>
-
Check actual BPP by render_format in upload_boxes, not by drawable BPP. It is required when we used different BPP formats for storing and rendering (for example, in the case of UYVY). The problem of UYVY size lies inside method of glamor downloading boxes. When we set GLAMOR_CREATE_FORMAT_CBCR, it actually uses 16-bit GL and Pixman formats, but before this change in glamor_download_boxes, that function deduces GL and Pixman formats from BPP, which is wrong in this case (will be deduced to 32). When GL and Pixman format BPP is identical to drawable BPP, this change does nothing, but when it is different - it will prioritize Pixman format, not the format deduced from BPP. Closes: #1730 Signed-off-by:
Konstantin Pugin <ria.freelander@gmail.com> (cherry picked from commit 75f56b79) Part-of: <!1635>
-
Olivier Fourdan authored
Currently, we would start dequeuing events as soon as a device is resumed, regardless of its capabilities. If the capabilities are not available, we would just fallback to the regular XTEST code path and not use input emulation. As a result, it is very likely that we shall lose the first events until the compositor resumes first a device with the requested capabilities. To avoid that issue, start emulating only once we have the requested capabilities, if they match the seat capabilities. Closes: #1732 Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 0525b9a5) Part-of: <!1635>
-
Olivier Fourdan authored
This is a small code refactoring to help with clarity, simply move the code from the switch case for device resume to a dedicated function. No functional change. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 68ec297e) Part-of: <!1635>
-
Olivier Fourdan authored
If glamor_link_glsl_prog() fails, we may jump to the failed code path which frees the variable vs_prog_string and fs_prog_string. But those variables were already freed just before, so in that case we end up freeing the memory twice. Simply move the free at the end of the success code path so we are sure to free the values only once, either in the successful of failed code paths. Fixes: 2906ee5e - glamor: Fix leak in glamor_build_program() Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 34ea0203) Part-of: <!1635>
-
Olivier Fourdan authored
Currently, we would log only the event type, use the libei API to also log the name in plain text, so we can quickly identify the events we're missing out. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 1a42fe40) Part-of: <!1635>
-
Olivier Fourdan authored
Although we do not do anything with that event, handle it so we don't end up in the "Unhandled event" territory. Closes: #1722 Fixes: a1333342 - xwayland: Add XTEST support using EIS Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit bfabd3bd) Part-of: <!1635>
-
Olivier Fourdan authored
Since commit d370f1e5, Xwayland can optionally be started rootful and fullscreen. To do so, it will setup a viewport to scale the root window to match the size of the output. However, if the rootful Xwayland window receives an xdg-surface configure event before the output definition is complete, as with e.g. the labwc Wayland compositor, we might end up trying to setup a viewport with a destination size of 0x0 which is a protocol violation, and that kills Xwayland. To avoid that issue, only setup the viewport if the output size is meaningful. Also, please note that once the output definition is complete, i.e. when the "done" event is eventually received, we shall recompute the size for fullscreen again, hence achieving the desired fullscreen state. Fixes: d370f1e5 - xwayland: add fullscreen mode for rootful Closes: #1717 Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 66f5e7e9) Part-of: <!1635>
-
Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as: ../dix/main.c:165:42: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 165 | serverClient = calloc(sizeof(ClientRec), 1); | ^~~~~~~~~ ../dix/main.c:165:42: note: earlier argument should specify number of elements, later size of each element Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 522f469f) Part-of: <!1635>
-
struct hostent->h_addr_list is of type char**, not const char**. GCC considers this an error when in C99 mode or later. Signed-off-by:
Joaquim Monteiro <joaquim.monteiro@protonmail.com> (cherry picked from commit 0ddcd878) Part-of: <!1635>
-