1. 04 Sep, 2020 2 commits
    • Valentin's avatar
      Fix undefined behavior · 1ab6a818
      Valentin authored
      Without the casts the bytes accesses get converted to int. but int is
      not guaranteed to be 4 bytes large. Even when it is 4 bytes large
      `bytes[3] << 24` does not fit because int is signed.
      Signed-off-by: default avatarValentin Kettner <vakevk@gmail.com>
      1ab6a818
    • Valentin's avatar
      Use fixed size integer type · fc3beac7
      Valentin authored
      This type is meant to be 4 bytes large as seen in _XcursorReadUInt which
      always reads 4 bytes. An unsigned int is often 4 bytes large but this
      isnt' guaranteed so it is cleaner to use the exact type we want.
      Signed-off-by: default avatarValentin Kettner <vakevk@gmail.com>
      fc3beac7
  2. 18 Aug, 2020 1 commit
  3. 14 Aug, 2020 1 commit
  4. 16 Jun, 2020 1 commit
    • Simon Ser's avatar
      protocol: disambiguate key codes in wl_keyboard.key · 1dfd2169
      Simon Ser authored
      Explain that wl_keyboard.key yields platform-specific key codes.
      Some compositors use Linux key codes (defined in the
      linux/input-event-codes.h header file, e.g. KEY_ESC), however
      clients should not assume that this is always the case. The only
      reliable way for clients to interpret key codes is to feed them
      into a keyboard mapping.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      1dfd2169
  5. 12 Jun, 2020 2 commits
  6. 05 Jun, 2020 5 commits
  7. 04 Jun, 2020 2 commits
    • Peter Hutterer's avatar
      gitlab CI: update to use the fdo ci templates · cf20f241
      Peter Hutterer authored
      Instead of building a new debian image every time we build the repo, let's build
      it once and re-use it. This way we're more  likely to spot actual bugs vs issues
      with the distribution (or mirrors). This is the same approach mesa, gstreamer,
      libinput, etc. already use.
      
      The pipeline consists of two parts: container-build and distribution-image. Both
      use the FDO_DISTRIBUTION_... variables to do their thing, the former to build an
      image, the latter to use that image. The container-build step is a noop if an
      image with that tag already exists in the registry, the templates take care of
      all that.
      
      The .debian.buster section groups the variables needed to easily extend all jobs
      requiring buster. Not all variables are used by all jobs but meh.
      
      The grouping is slightly odd because some debian-specific variables are in
      the global variables and others in the .debian.buster section. This grouping
      will make things easier if we extend to build on other distributions - then we
      have all packages and tags in one place.
      
      Because buster doesn't have a recent-enough version of meson, we install that
      from pip.
      
      Fixes #79Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      cf20f241
    • Peter Hutterer's avatar
      editorconfig: add settings for the .gitlab-ci.yml file · 94c036d7
      Peter Hutterer authored
      Different indentation and we don't want a fixed line length here, wrapping yaml
      is prone to introduce bugs.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      94c036d7
  8. 03 Jun, 2020 1 commit
  9. 29 Apr, 2020 1 commit
  10. 23 Apr, 2020 1 commit
    • Guido Günther's avatar
      scanner: Guard interface declarations · cc8b6aa3
      Guido Günther authored
      This allows to include client and server headers in the same file
      fixing warnings like
      
      In file included from ../subprojects/wlroots/include/wlr/types/wlr_layer_shell_v1.h:16,
                       from ../src/desktop.h:16,
                       from ../src/server.h:13,
                       from ../tests/testlib.c:8:
      tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-protocol.h:80:34: warning: redundant redeclaration of ‘zwlr_layer_shell_v1_interface’ [-Wredundant-decls]
         80 | extern const struct wl_interface zwlr_layer_shell_v1_interface;
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from ../tests/testlib.h:8,
                       from ../tests/testlib.c:7:
      tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-client-protocol.h:77:34: note: previous declaration of ‘zwlr_layer_shell_v1_interface’ was here
         77 | extern const struct wl_interface zwlr_layer_shell_v1_interface;
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from ../subprojects/wlroots/include/wlr/types/wlr_layer_shell_v1.h:16,
                       from ../src/desktop.h:16,
                       from ../src/server.h:13,
                       from ../tests/testlib.c:8:
      tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-protocol.h:106:34: warning: redundant redeclaration of ‘zwlr_layer_surface_v1_interface’ [-Wredundant-decls]
        106 | extern const struct wl_interface zwlr_layer_surface_v1_interface;
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from ../tests/testlib.h:8,
                       from ../tests/testlib.c:7:
      tests/59830eb@@footest@sta/wlr-layer-shell-unstable-v1-client-protocol.h:103:34: note: previous declaration of ‘zwlr_layer_surface_v1_interface’ was here
        103 | extern const struct wl_interface zwlr_layer_surface_v1_interface;
      Signed-off-by: Guido Günther's avatarGuido Günther <agx@sigxcpu.org>
      Closes: #158
      cc8b6aa3
  11. 16 Apr, 2020 2 commits
  12. 07 Apr, 2020 1 commit
  13. 18 Mar, 2020 3 commits
  14. 13 Mar, 2020 1 commit
    • Matt Turner's avatar
      meson: Add option to control building wayland-scanner · 618663c7
      Matt Turner authored
      Wayland requires a binary, wayland-scanner, to be run during the build
      process. For any configuration other than native builds (including
      cross compiling and even 32-bit x86 builds on an x86-64 build machine)
      Wayland's build process builds and uses its own wayland-scanner.
      
      For any builds using a cross file, wayland-scanner is built for the host
      machine and therefore cannot be executed during the build of the Wayland
      libraries. Instead builds using a cross file must execute the build
      machine's wayland-scanner (typically /usr/bin/wayland-scanner).
      
      As such, to build Wayland's libraries for a non-native ABI a package
      manager must build and install /usr/bin/wayland-scanner first. But then
      the build for the native ABI then rebuilds wayland-scanner itself and
      doesn't use the system's, and worse, wants to install its own, which
      conflicts with the /usr/bin/wayland-scanner already installed!
      
      So, add the -Dscanner=... option to control whether to install
      wayland-scanner.
      Signed-off-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
      618663c7
  15. 09 Mar, 2020 1 commit
    • Matt Turner's avatar
      meson: Require wayland-scanner of a matching version · 5ddb8dff
      Matt Turner authored
      We have always built libwayland with the scanner from the same build so
      that the generated code and installed headers are exactly up-to-date
      with the libwayland version. If libwayland was to use a scanner later
      than itself, the scanner might do things that are not available in the
      libwayland at hand, leading to a broken build or a broken library
      (headers).
      Signed-off-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
      5ddb8dff
  16. 05 Mar, 2020 1 commit
  17. 24 Feb, 2020 1 commit
    • Tomek Bury's avatar
      util: fix compiler warning · ef40f82a
      Tomek Bury authored
      conversion to 'wl_fixed_t {aka int}' from 'int64_t {aka long int}'
      may alter its value [-Werror=conversion]
      ef40f82a
  18. 23 Feb, 2020 3 commits
  19. 15 Feb, 2020 1 commit
    • Jan Beich's avatar
      meson/tests: add missing dependencies on protocol headers · 0fc00fff
      Jan Beich authored
      In file included from ../tests/connection-test.c:43:
      In file included from ../tests/test-compositor.h:30:
      ../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found
       #include "wayland-client-protocol.h"
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from ../tests/display-test.c:45:
      In file included from ../src/wayland-server.h:104:
      src/wayland-server-protocol.h:4454:2: error: unterminated /* comment
              /**
              ^
      In file included from ../tests/cpp-compile-test.cpp:2:
      In file included from src/wayland-server-protocol.h:8:
      In file included from ../src/wayland-server.h:104:
      src/wayland-server-protocol.h:3:2: error: unterminated conditional directive
       #ifndef WAYLAND_SERVER_PROTOCOL_H
        ^
      ../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h!
       #error including wayland-server-protocol.h did not include wayland-server.h!
        ^
      In file included from ../tests/headers-protocol-test.c:26:
      In file included from src/wayland-client-protocol.h:8:
      In file included from ../src/wayland-client.h:40:
      src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive
       #ifndef WL_SHM_FORMAT_ENUM
        ^
      In file included from ../tests/protocol-logger-test.c:34:
      In file included from ../src/wayland-client.h:40:
      src/wayland-client-protocol.h:2613:1: error: unterminated /* comment
      /**
      ^
      ../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface'
              res = wl_resource_create(client, &wl_seat_interface, 4, 0);
                                                ^
      0fc00fff
  20. 11 Feb, 2020 2 commits
  21. 04 Feb, 2020 2 commits
  22. 28 Jan, 2020 2 commits
    • Simon Ser's avatar
      367d2985
    • Simon Ser's avatar
      tests: fix memory leak in proxy-test · 96a8465e
      Simon Ser authored
      When running tests with ASan, proxy-test fails at the proxy_tag test:
      
          ==27843==ERROR: LeakSanitizer: detected memory leaks
      
          Direct leak of 32 byte(s) in 1 object(s) allocated from:
              #0 0x7f65a732dada in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:144
              #1 0x7f65a71cb3ea in wl_display_add_protocol_logger src/wayland-server.c:1813
              #2 0x557c640c0980 in proxy_tag tests/proxy-test.c:104
              #3 0x557c640c1159 in run_test tests/test-runner.c:153
              #4 0x557c640c1e2e in main tests/test-runner.c:337
              #5 0x7f65a6ea0ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
      
          SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
      
      Destroying the logger fixes the leak.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Fixes: 493ab79b ("proxy: Add API to tag proxy objects")
      96a8465e
  23. 23 Jan, 2020 1 commit
    • Ihor Antonov's avatar
      os: fallback for unsupported posix_fallocate · 8e219964
      Ihor Antonov authored
      Some filesystems do not support fallocate and return EOPNOTSUPP.
      
      On musl-based distros libwayland-cursor exits abruptly which causes the
      application to crash. Unlike glibc, musl does not provide a fallback
      mechanism for handling unsupported fallocate. Instead, musl developers
      argue that application should handle the case of unsupported system
      call.
      
      This commit allows falback to ftruncate in case when EOPNOTSUPP
      was recieved.
      Signed-off-by: Ihor Antonov's avatarIhor Antonov <ihor@antonovs.family>
      8e219964
  24. 22 Jan, 2020 1 commit
  25. 21 Jan, 2020 1 commit