xemacs glyph clipping effect

Klaus Reim K.Reim at t-online.de
Sun Feb 25 12:49:13 EST 2007


Dear Bug Team!

this defect shows with any xemacs version I tried from 21.4 to 21.5.27.
It is easily reproduced by evaluating the following lisp code.
(attached you find a screen shot of a xemacs session showing
the buffer produced by this code, both correctly and incorrectly drawn):

--- start of sample ---
(let* ((pattern "0123456789ABCDEF")
       (max (length pattern))
       (buffer (get-buffer-create "*glyph-clipping-bug*"))
       i)
  (switch-to-buffer buffer)
  (erase-buffer)
  (setq i 0)
  ;; 4 is sufficient to see the effect.
  ;; 50 shows the same in slow motion, and you may scroll
  ;; several times to see variations of the theme
  (while (< i 50)
    (insert "Scroll down\nwith mouse wheel\nand watch\nclipping effect.\n")
    (setq i (1+ i)))
  ;; create test glyphs
  (goto-char (point-min))
  (while (not (eobp))
    (setq i (1+ (% i max)))
    (let ((extent (make-extent (point) (point-at-eol))))
      (set-extent-property extent 'end-glyph
                           (make-glyph
                            (vector 'layout
                                    :orientation 'horizontal
                                    :vertically-justify 'top
                                    :horizontally-justify 'left
                                    :pixel-height 16
                                    :items
                                    (list (vector 'button :descriptor (substring pattern 0 i)
                                                  :callback '(message "hello world")
                                                  :pixel-height 16
                                                  :face 'bold)
                                          (vector 'button :descriptor (substring pattern 0 i)
                                                  :callback '(message "hello world")
                                                  :pixel-height 16
                                                  :face 'bold)
                                          (vector 'button :descriptor (substring pattern 0 i)
                                                  :callback '(message "hello world")
                                                  :pixel-height 16
                                                  :face 'bold)))))
      (set-extent-property extent 'end-glyph-layout 'inside-margin)
      (forward-line)))
  (goto-char (point-min)))
-- end of sample ---

The example is overdoing things to make the effect more dramatic.
Anyway, just eval the code to get a buffer with glyphs running
down the right window margin. As soon as you scroll downwards with the
mouse wheel (i.e. 5 lines of text in one go) you will see for yourself ...

Besides the clipping defect, the example also makes a rather bad
performance of the redisplay of glyphs evident. There is a noticeable
flickering of the button windows until the redisplay comes to a rest
after each scroll, while from the X11-point of view basically only
a movement of the X-windows without any need for a redisplay
or geometry changes seems necessary.

Hope you can do something about the clipping at least.

Many thanks for your efforts.

Cheers,

Klaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xemacs-clipping-bug.png
Type: image/png
Size: 35574 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-beta/attachments/20070225/7b57f627/xemacs-clipping-bug.png


More information about the XEmacs-Beta mailing list