From: Grégoire Jadi Date: Thu, 18 Jul 2013 12:12:03 +0000 (+0200) Subject: * src/xwidget.c (Fset_frame_visible): Hack to force a frame to be X-Git-Tag: emacs-25.0.90~2879 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1eea231d3ebcc2801fe1a8459e60fdb687631ba9;p=emacs.git * src/xwidget.c (Fset_frame_visible): Hack to force a frame to be considered as visible to trigger the display engine. * lisp/xwidget.el (xwidget-display): Force the display engine to create a xwidget_view of the given xwidget. --- diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 81589e3d57d..b38f7948c6c 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -58,7 +58,13 @@ see `make-xwidget' for types suitable for TYPE." ;; ;; (start-process "xembed2" "*xembed2*" "uzbl-core" "-s" (number-to-string xembed-id) "http://www.fsf.org" ) ) ;; ))))) - +(defun xwidget-display (xwidget) + "Force xwidget to be displayed to create a xwidget_view." + (let* ((buffer (xwidget-buffer xwidget)) + (window (display-buffer buffer)) + (frame (window-frame window))) + (set-frame-visible frame t) + (redisplay t))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/xwidget.c b/src/xwidget.c index 28bb056954e..660c4ef9961 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -1554,6 +1554,17 @@ WINDOW if specified, otherwise it uses the selected window. */) return Qnil; } +DEFUN ("set-frame-visible", Fset_frame_visible, Sset_frame_visible, + 2, 2, 0, + doc: /* HACKY */) + (Lisp_Object frame, Lisp_Object flag) +{ + CHECK_FRAME (frame); + struct frame *f = XFRAME (frame); + SET_FRAME_VISIBLE (f, !NILP (flag)); + return flag; +} + DEFUN ("xwidget-plist", Fxwidget_plist, Sxwidget_plist, 1, 1, 0, doc: /* Return the plist of XWIDGET. */) @@ -1627,6 +1638,7 @@ syms_of_xwidget (void) defsubr (&Sxwidget_view_lookup); defsubr (&Sxwidget_query_on_exit_flag); defsubr (&Sset_xwidget_query_on_exit_flag); + defsubr (&Sset_frame_visible); #ifdef HAVE_WEBKIT_OSR defsubr (&Sxwidget_webkit_goto_uri);