aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGrégoire Jadi2013-07-18 11:48:13 +0200
committerGrégoire Jadi2013-07-18 11:48:13 +0200
commita425ea65234441d4774d32dc7511a9401467b54d (patch)
treeb3dd127a0a8fcc297727c6d382eba72e0e207834 /lisp
parent5a422d95aa63713b29d93ffbfd3595d235a026ba (diff)
downloademacs-a425ea65234441d4774d32dc7511a9401467b54d.tar.gz
emacs-a425ea65234441d4774d32dc7511a9401467b54d.zip
* src/xwidget.c (Fxwidget_delete_zombies): Re-implemented in Lisp.
Note: It is not longer necessary to delete xwidget with killed buffer here because it is done automatically when a buffer is killed. (Fdelete_xwidget_view): New function to delete the given xwidget-view. * lisp/xwidget.el (xwidget-delete-zombies): Re-implementation. * src/xwidget.c (Fxwidget_delete_zombies): Re-implemented in Lisp. Note: It is not longer necessary to delete xwidget with killed buffer here because it is done automatically when a buffer is killed. (Fdelete_xwidget_view): New function to delete the given xwidget-view. * lisp/xwidget.el (xwidget-delete-zombies): New implementation.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/xwidget.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 5d04618209c..81589e3d57d 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -438,16 +438,24 @@ It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
438 438
439 439
440;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 440;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
441
442(defun xwidget-delete-zombies ()
443 (mapcar (lambda (xwidget-view)
444 (when (or (not (window-live-p (xwidget-view-window xwidget-view)))
445 (not (find (xwidget-view-model xwidget-view)
446 xwidget-list)))
447 (delete-xwidget-view xwidget-view)))
448 xwidget-view-list))
449
441(defun xwidget-cleanup () 450(defun xwidget-cleanup ()
442 "Delete zombie xwidgets." 451 "Delete zombie xwidgets."
443 ;;its still pretty easy to trigger bugs with xwidgets. 452 ;;its still pretty easy to trigger bugs with xwidgets.
444 ;;this function tries to implement a workaround 453 ;;this function tries to implement a workaround
445 (interactive) 454 (interactive)
446 (xwidget-delete-zombies) ;;kill xviews who should have been deleted but stull linger 455 ;; kill xviews who should have been deleted but stull linger
447 (redraw-display);;redraw display otherwise ghost of zombies will remain to haunt the screen 456 (xwidget-delete-zombies)
448 ) 457 ;; redraw display otherwise ghost of zombies will remain to haunt the screen
449 458 (redraw-display))
450
451 459
452;;this is a workaround because I cant find the right place to put it in C 460;;this is a workaround because I cant find the right place to put it in C
453;;seems to work well in practice though 461;;seems to work well in practice though