diff options
| author | Joakim Verona | 2011-09-14 08:21:01 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-09-14 08:21:01 +0200 |
| commit | 8918dacdb34e848edcd894e32de5b7b4e2fa19ea (patch) | |
| tree | 04d93bffc0d0c587afa586484a6bd4113f264f53 | |
| parent | 0e852ac995c1bb7aa059ffface31b7b7c00308ea (diff) | |
| download | emacs-8918dacdb34e848edcd894e32de5b7b4e2fa19ea.tar.gz emacs-8918dacdb34e848edcd894e32de5b7b4e2fa19ea.zip | |
attempt to avoid possible redisplay loop
| -rw-r--r-- | README.xwidget | 24 | ||||
| -rw-r--r-- | lisp/xwidget.el | 3 |
2 files changed, 26 insertions, 1 deletions
diff --git a/README.xwidget b/README.xwidget index 83af254bb1a..e6d0252b0d5 100644 --- a/README.xwidget +++ b/README.xwidget | |||
| @@ -409,6 +409,30 @@ unshow_buffer | |||
| 409 | Added cleanup those window configuration hook which works in practice | 409 | Added cleanup those window configuration hook which works in practice |
| 410 | but feels kludgy. | 410 | but feels kludgy. |
| 411 | 411 | ||
| 412 | *** code looks like this | ||
| 413 | |||
| 414 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 415 | (defun xwidget-cleanup () | ||
| 416 | "Delete zombie xwidgets." | ||
| 417 | ;;its still pretty easy to trigger bugs with xwidgets. | ||
| 418 | ;;this function tries to implement a workaround | ||
| 419 | (interactive) | ||
| 420 | (xwidget-delete-zombies) ;;kill xviews who should have been deleted but stull linger | ||
| 421 | (redraw-display);;redraw display otherwise ghost of zombies will remain to haunt the screen | ||
| 422 | ) | ||
| 423 | |||
| 424 | |||
| 425 | |||
| 426 | ;;this is a workaround because I cant find the right place to put it in C | ||
| 427 | ;;seems to work well in practice though | ||
| 428 | (add-hook 'window-configuration-change-hook 'xwidget-cleanup) | ||
| 429 | |||
| 430 | *** but it ought rather to work like this | ||
| 431 | xwidget-delete-zombies should be called from C after window | ||
| 432 | configuration has changed but before redisplay. redisplay should not | ||
| 433 | be called. | ||
| 434 | |||
| 435 | |||
| 412 | ** DONE BUG annoying backtrace | 436 | ** DONE BUG annoying backtrace |
| 413 | CLOSED: [2011-07-19 Tue 14:28] | 437 | CLOSED: [2011-07-19 Tue 14:28] |
| 414 | (this no longer seems to happen even under heavy usage. seems merging | 438 | (this no longer seems to happen even under heavy usage. seems merging |
diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 961191980d2..83f95852866 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el | |||
| @@ -327,7 +327,8 @@ It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'." | |||
| 327 | 327 | ||
| 328 | ;;this is a workaround because I cant find the right place to put it in C | 328 | ;;this is a workaround because I cant find the right place to put it in C |
| 329 | ;;seems to work well in practice though | 329 | ;;seems to work well in practice though |
| 330 | (add-hook 'window-configuration-change-hook 'xwidget-cleanup) | 330 | ;;(add-hook 'window-configuration-change-hook 'xwidget-cleanup) |
| 331 | (add-hook 'window-configuration-change-hook 'xwidget-delete-zombies) | ||
| 331 | 332 | ||
| 332 | ;;killflash is sadly not reliable yet. | 333 | ;;killflash is sadly not reliable yet. |
| 333 | (defvar xwidget-webkit-kill-flash-oneshot t) | 334 | (defvar xwidget-webkit-kill-flash-oneshot t) |