[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/posframe f335f92 24/40: Make the buffer in posframe ded

From: Feng Shu
Subject: [elpa] externals/posframe f335f92 24/40: Make the buffer in posframe dedicated
Date: Wed, 5 Feb 2020 04:27:20 -0500 (EST)

branch: externals/posframe
commit f335f9298951e39c99d1c51cdaed661c29ff5812
Author: Ivan Yonchovski <address@hidden>
Commit: Ivan Yonchovski <address@hidden>

    Make the buffer in posframe dedicated
    - I am trying to use posframe to create a floating control for dap-mode 
    will have Step in/Step out/Continue, etc buttons (see screenshot). The 
    that I am facing is that when posframe-show which is called when the new 
set of
    buttons is enabled is performed when current-frame the posframe itself. In 
    to solve that in our code I used
    ``` elisp
    (when (eq (selected-frame) pos-frame)
      (select-frame (frame-parent pos-frame)))
    But when I do that from time to time the buffer in the posframe chamges. The
    following piece of code fixes the issue.
 posframe.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 5705397..db35ce6 100644
--- a/posframe.el
+++ b/posframe.el
@@ -304,7 +304,8 @@ This posframe's buffer is BUFFER-OR-NAME."
             (set-window-parameter posframe-window 'mode-line-format 'none))
           (unless respect-header-line
             (set-window-parameter posframe-window 'header-line-format 'none))
-          (set-window-buffer posframe-window buffer)))
+          (set-window-buffer posframe-window buffer)
+          (set-window-dedicated-p posframe-window t)))
 (defun posframe-arghandler-default (_buffer-or-name _arg-name value)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]