From: Grégoire Jadi Date: Tue, 13 Aug 2013 14:04:50 +0000 (+0200) Subject: * lisp/xwidget.el (xwidget-display): Return a useful value. X-Git-Tag: emacs-25.0.90~2769^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c9215889ccd18ba83856004a775461eedea07ad9;p=emacs.git * lisp/xwidget.el (xwidget-display): Return a useful value. * test/automated/xwidget-tests.el (xwidget-view-p): Use `xwidget-display'. --- diff --git a/lisp/xwidget.el b/lisp/xwidget.el index c0d58972e14..1f0932ca7dd 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -59,12 +59,14 @@ see `make-xwidget' for types suitable for TYPE." ;; ))))) (defun xwidget-display (xwidget) - "Force xwidget to be displayed to create a xwidget_view." + "Force xwidget to be displayed to create a xwidget_view. Return +the window displaying XWIDGET." (let* ((buffer (xwidget-buffer xwidget)) (window (display-buffer buffer)) (frame (window-frame window))) (set-frame-visible frame t) - (redisplay t))) + (redisplay t) + window)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/test/automated/xwidget-tests.el b/test/automated/xwidget-tests.el index 104daa3fc0f..7beaeda000e 100644 --- a/test/automated/xwidget-tests.el +++ b/test/automated/xwidget-tests.el @@ -90,11 +90,10 @@ (with-temp-buffer (insert ?\0) (let* ((xwidget (xwidget-insert 1 type title 100 100)) - (window (display-buffer (current-buffer)))) + (window (xwidget-display xwidget))) (set-xwidget-query-on-exit-flag xwidget nil) - (set-frame-visible (window-frame window) t) - (redisplay t) - (xwidget-view-p (xwidget-view-lookup xwidget window))))) + (xwidget-view-p + (xwidget-view-lookup xwidget window))))) :env (list type title) :graphical t :emacs-args '("-T" "emacs-debug")))))