1. 07 May, 2021 1 commit
  2. 06 May, 2021 2 commits
  3. 04 May, 2021 1 commit
    • Tobias Stoeckmann's avatar
      fix XcursorTheme loop regression · 6edf1caf
      Tobias Stoeckmann authored
      
      
      Handle themes with multiple inherit entries. Although the previous
      commit keeped track of inherited themes, it only handled multiple theme
      entries on the highest level.
      
      This fix unconditionally checks if the next upper level contains a line.
      If it does, it processes contained themes (i.e. the current theme had an
      inherited entry in its index file).
      
      If the upper level has no more themes, it goes down a level and
      processes the next theme there. If no next theme exists, it moves down
      another level and so on until it reaches level 0, i.e. the initially
      supplied theme.
      
      The lowest level (d = 0) is treated specially because we must not modify
      the supplied theme, which could happen when calling _XcursorNextPath.
      Signed-off-by: Tobias Stoeckmann's avatarTobias Stoeckmann <tobias@stoeckmann.org>
      6edf1caf
  4. 02 May, 2021 1 commit
    • Tobias Stoeckmann's avatar
      Handle more theme loop situations · b47ca985
      Tobias Stoeckmann authored
      This is a follow up for commit f64a8cc1
      resulting from https://bugs.freedesktop.org/show_bug.cgi?id=3603
      
      
      
      The current loop detection only works for direct self references but not
      for transitive ones. Limiting the inheritance depth fixes this issue as
      suggested by Keith Packard.
      
      I avoided the introduction of a recursion function. Instead I modified
      XcursorScanTheme to work iterative.
      
      The current recursion code adds the "Inherits=..." line to heap and has
      an iteration variable to go through all themes listed in that line per
      recursion. This is covered with the newly introduced XcursorInherit
      struct with its fields "line" and "theme". Since "theme" points into
      "line", only "line" has to be freed eventually.
      
      If a fixed inheritage limit of 32 is reached, the code stops processing
      and returns NULL. It also returns NULL if it detects the initial theme
      in one of the inheritages to break the loop early on.
      
      Last but not least I removed the printf statement. The only situation in
      which libXcursor writes to stdout is when it is explicitly requested.
      Signed-off-by: Tobias Stoeckmann's avatarTobias Stoeckmann <tobias@stoeckmann.org>
      b47ca985
  5. 19 Mar, 2021 2 commits
  6. 17 Mar, 2021 18 commits
  7. 12 Mar, 2021 8 commits
  8. 30 Aug, 2020 2 commits
    • Valentin's avatar
      Fix undefined behavior · 204b6f13
      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.
      204b6f13
    • Valentin's avatar
      Use fixed size integer type · 448398a3
      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.
      448398a3
  9. 11 Mar, 2019 1 commit
  10. 08 Dec, 2018 1 commit
  11. 20 Nov, 2018 1 commit
  12. 10 Nov, 2018 1 commit
    • Cosimo Cecchi's avatar
      Support XDG user data dir location · 2263c196
      Cosimo Cecchi authored
      Nowadays ~/.icons is not used anymore as the preferred location for
      custom user icon themes; XDG_DATA_HOME/icons (aka ~/.local/share/icons)
      is what toolkits like GTK prefer.
      
      Prepend that location to the default xcursor path, so that cursor
      themes installed there can be used by apps and toolkits that use
      libXcursor.
      2263c196
  13. 24 Mar, 2018 1 commit