]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/xwidget.el (xwidget-display): Return a useful value.
authorGrégoire Jadi <gregoire.jadi@gmail.com>
Tue, 13 Aug 2013 14:04:50 +0000 (16:04 +0200)
committerGrégoire Jadi <gregoire.jadi@gmail.com>
Tue, 13 Aug 2013 14:04:50 +0000 (16:04 +0200)
* test/automated/xwidget-tests.el (xwidget-view-p): Use `xwidget-display'.

lisp/xwidget.el
test/automated/xwidget-tests.el

index c0d58972e1467c46583da19a69da4a69c46f41f5..1f0932ca7dd2d4d69423a4e37fc2f67e3d793082 100644 (file)
@@ -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))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 104daa3fc0fbfb97110e80cf5aa9cfa4966636df..7beaeda000ec38758bf1126fbddfe7a6199e0397 100644 (file)
                              (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")))))