Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top inconsistent placement with respect to toolbar #116

Open
goldfita opened this issue Aug 12, 2022 · 3 comments
Open

Top inconsistent placement with respect to toolbar #116

goldfita opened this issue Aug 12, 2022 · 3 comments

Comments

@goldfita
Copy link

Dap is using top-center to place the ui-controls. This places the controls over the toolbar, which makes sense to me, as long as there aren't already buttons there. But if you remove the toolbar, the controls end up in the buffer. I moved it left in scratch, to make it obvious. Whether it should be in the buffer or over the toolbar, the behavior should probably be consistent. Maybe check the toolbar before placing??

https://github.com/emacs-lsp/dap-mode/blob/master/dap-ui.el

posframe-in-buffer

@tumashu
Copy link
Owner

tumashu commented Dec 12, 2022

Sorry, I do not undersand this issue.

@goldfita
Copy link
Author

Maybe this is a dap-ui issue. Normally the ui-controls are placed over the Emacs toolbar. But when you remove the toolbar, it places the ui-controls inside the buffer, over the text, as you can see from the image.

 (posframe-show dap-ui--control-buffer
                           :string content
                           :poshandler #'posframe-poshandler-frame-top-center
                           :internal-border-width 8)

Really this is a limitation of Emacs. Most modern UIs have dockable windows, so you can make sure things stay where you put them.

@tumashu
Copy link
Owner

tumashu commented Dec 12, 2022

Normally the ui-controls are placed over the Emacs toolbar. But when you remove the toolbar, , it places the ui-controls inside the buffer

This seem to be expected behavior,

you can try refposhandler argument, but I don't think it is a good idea

(posframe-show "test"
               :string "hello world"
               :poshandler #'posframe-poshandler-frame-top-center
               :internal-border-width 8
               :refposhandler (lambda (frame) (cons 0 0))
               )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants