2001-08-21 Gerd Moellmann <gerd@gnu.org>
+ * gs.el (gs-set-ghostview-colors-window-prop): Call
+ x-change-window-property with 3rd arg FRAME.
+ (gs-load-image): Wait for a previoius Ghostscript process
+ to complete before starting a new one.
+
* image.el (image-type-regexps): Make sure that the TIFF
pattern is only matched at the beginning of a string.
From Markus Rost <rost@math.ohio-state.edu>.
((x-display-grayscale-p frame) "Grayscale")
(t "Monochrome"))))
(x-change-window-property "GHOSTVIEW_COLORS"
- (format "%s %s" mode pixel-colors))))
+ (format "%s %s" mode pixel-colors)
+ frame)))
;
the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful."
(unwind-protect
(let ((file (plist-get (cdr spec) :file))
- gs)
+ gs
+ (waiting 0))
+ ;; If another ghostscript is running, wait for it to complete.
+ ;; Two ghostscript processes running at the same time would
+ ;; use the same window properties, and get confused.
+ (while (and (process-status "gs") (< waiting 10))
+ (sit-for 0 100 t)
+ (setq waiting (1+ waiting)))
+ (when (process-status "gs")
+ (kill-process "gs"))
(gs-set-ghostview-window-prop frame spec img-width img-height)
(gs-set-ghostview-colors-window-prop frame pixel-colors)
(setenv "GHOSTVIEW" window-and-pixmap-id)