Skip to content

Commit

Permalink
Fix: (taxy-magit-section-format-items) Only use visible frames
Browse files Browse the repository at this point in the history
When server-mode is enabled, an invisible frame is present, which
still returns X from FRAMEP, but which should not be used for
calculating image sizes.

This should fix an "Invalid image size" error that was happening (when
such an invisible frame happened to be sorted first in FRAME-LIST).

See <alphapapa/ement.el#298 (comment)>.
  • Loading branch information
alphapapa committed Sep 23, 2024
1 parent e8a55d1 commit 14a7168
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
3 changes: 2 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ This library renders [[https://github.com/alphapapa/taxy.el][Taxy]] structs with

** 0.14.3-pre

Nothing new yet.
*Fixes*
+ Only use visible frames when checking image sizes. (See [[https://github.com/alphapapa/ement.el/issues/298#issuecomment-2369652629][Ement.el #298]].)

** 0.14.2

Expand Down
4 changes: 3 additions & 1 deletion taxy-magit-section.el
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ the items' values for each column."
(or window-system-frame
(setf window-system-frame
(cl-loop for frame in (frame-list)
when (member (framep frame) '(x w32 ns pgtk))
when (and (frame-visible-p frame)
(memq (framep frame)
'(x w32 ns pgtk)))
return frame))
(error "taxy-magit-section-format-items: No graphical frame to calculate image size"))))))
(_
Expand Down
33 changes: 18 additions & 15 deletions taxy-magit-section.info
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ File: README.info, Node: 0143-pre, Next: 0142, Up: Changelog
2.1 0.14.3-pre
==============

Nothing new yet.
*Fixes*
• Only use visible frames when checking image sizes. (See Ement.el
#298
(https://github.com/alphapapa/ement.el/issues/298#issuecomment-2369652629).)


File: README.info, Node: 0142, Next: 0141, Prev: 0143-pre, Up: Changelog
Expand Down Expand Up @@ -240,20 +243,20 @@ Node: Top221
Node: Installation882
Node: Changelog1236
Node: 0143-pre1539
Node: 01421655
Node: 01411887
Node: 0142942
Node: 0133147
Node: 01223618
Node: 01213750
Node: 0123883
Node: 0114020
Node: 0104221
Node: 0914378
Node: 094772
Node: Development4964
Node: Credits5191
Node: License5381
Node: 01421811
Node: 01412043
Node: 0143098
Node: 0133303
Node: 01223774
Node: 01213906
Node: 0124039
Node: 0114176
Node: 0104377
Node: 0914534
Node: 094928
Node: Development5120
Node: Credits5347
Node: License5537

End Tag Table

Expand Down

0 comments on commit 14a7168

Please sign in to comment.