branch: externals/xelb commit 11005f2e0fa3ccc04c546ab99c67e64f73287820 Author: Chris Feng <chris.w.f...@gmail.com> Commit: Chris Feng <chris.w.f...@gmail.com>
Fix ch11ng/exwm#16 (cursor size not matching) --- xcb-cursor.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xcb-cursor.el b/xcb-cursor.el index beb6964..5579fff 100644 --- a/xcb-cursor.el +++ b/xcb-cursor.el @@ -251,9 +251,8 @@ (with-temp-buffer (set-buffer-multibyte nil) (insert-file-contents path) (buffer-string)))) - (best-size 0) xcb:lsb ;override global byte order - chunks + best-size chunks magic file-header file-header-toc chunk-header chunk) ;; Determine byte order (setq magic (substring data 0 4)) @@ -281,8 +280,9 @@ (when (= target subtype) (setq best-size target) (throw 'break nil)) - (when (> (abs (- target best-size)) - (abs (- target subtype))) + (when (or (not best-size) + (> (abs (- target best-size)) + (abs (- target subtype)))) (setq best-size subtype))))))) ;; Collect chunks fitting this size (setq chunk-header (make-instance 'xcb:cursor:-file-chunk-header))