Comments (18)
Still doesn't work here. The small snippet you proposed works well.
from lsp-ui.
With Alan Third's patch, I can confirm that his patch fixes it for me.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29953#8
from lsp-ui.
@jiegec I don't have a mac sorry.
How does your snippet look like ? Maybe I can help you to narrow it
from lsp-ui.
I selectively C-M-x
on some of the forms below, but can't reproduce the bug.
(defvar test-child-frame)
(let* ((params `((visibility . nil)
(minibuffer . ,(minibuffer-window))
(internal-border-width . 10)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(left-fringe . 0)
(right-fringe . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(min-width . 0)
(width . 0)
(min-height . 0)
(height . 0)
(line-spacing . 0)
(unsplittable . t)
(undecorated . t)
(left . -1)
(top . -1)
(no-accept-focus . t)
(no-special-glyphs . t)
(cursor-type . nil)
(default-minibuffer-frame . ,(selected-frame))))
(child-frame (window-frame
(display-buffer-in-child-frame
(get-buffer-create "*test*")
`((child-frame-parameters . ,params))))))
(setq test-child-frame child-frame))
(set-frame-parameter test-child-frame 'height 50)
(set-frame-parameter test-child-frame 'width 50)
(make-frame-visible test-child-frame)
(set-frame-parameter test-child-frame 'alpha '(85 . 50))
(delete-frame test-child-frame)
(make-thread (lambda ()
(make-frame-invisible test-child-frame)))
(make-frame-visible test-child-frame)
from lsp-ui.
from lsp-ui.
from lsp-ui.
The frame parameter after disappearing:
((tool-bar-position . top)
(parent-id)
(explicit-name)
(display . "localhost")
(visibility . t)
(icon-name)
(window-id . "20")
(bottom-divider-width . 0)
(right-divider-width . 0)
(top . 372)
(left + -694)
(buried-buffer-list)
(buffer-list #<buffer *lsp-ui-doc-13*>)
(unsplittable . t)
(modeline . t)
(width . 53)
(height . 24)
(name . "*lsp-ui-doc-13*")
(client . nowait)
(cursor-color . "#839496")
(background-mode . dark)
(display-type . color)
(default-minibuffer-frame . #<frame *Minibuf-1* 0x1090b2d30>)
(no-other-frame . t)
(mouse-wheel-frame)
(fullscreen)
(alpha)
(scroll-bar-height . 0)
(scroll-bar-width . 0)
(cursor-type)
(auto-lower)
(auto-raise)
(icon-type)
(title)
(buffer-predicate)
(tool-bar-lines . 0)
(menu-bar-lines . 0)
(no-accept-focus . t)
(no-focus-on-map)
(z-group)
(parent-frame . #<frame *Minibuf-1* 0x1090b2d30>)
(ns-transparent-titlebar . unbound)
(ns-appearance . unbound)
(undecorated . t)
(min-height . 0)
(min-width . 0)
(no-special-glyphs . t)
(right-fringe . 0)
(left-fringe . 0)
(line-spacing . 0)
(background-color . "#031A25")
(foreground-color . "#839496")
(horizontal-scroll-bars)
(vertical-scroll-bars)
(internal-border-width . 10)
(border-width . 0)
(font .
"-*-Inconsolata for Powerline-normal-normal-normal-*-22-*-*-*-m-0-iso10646-1")
(fontsize . 0)
(font-backend mac-ct)
(minibuffer . #<window 35 on *Minibuf-0*>))
from lsp-ui.
The top
and left
parameters somehow get corrupted, and setting them to zero has no effect.
from lsp-ui.
A child frame can't be outside of it's parent frame, otherwise it's not a child frame but a "normal" frame.
The bug appears only after a call to make-frame-invisible
?
Can you execute this function:
(defun test-child-frame-visible ()
(interactive)
(let* ((window (display-buffer-in-child-frame (get-buffer-create "test")
'((child-frame-parameters . ((left . -10)
(no-accept-focus . t)
(width . 50)
(height . 10)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(left-fringe . 0)
(right-fringe . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(unsplittable . t)
(undecorated . t)
(background-color . "red")
(top . 10)
(visibility . nil)
(mouse-wheel-frame . nil)
(no-other-frame . t))))))
(frame (window-frame window))
(count 0))
(while (< count 5)
(if (oddp count)
(make-frame-invisible frame)
(make-frame-visible frame))
(sit-for 1)
(setq count (1+ count)))
(delete-frame frame)))
The child frame should pop on the top right of your actual frame (still inside it), be invisible/visible every second at the exact same place.
from lsp-ui.
Also, does emacs on mac based on GTK or does it uses another toolkit ?
from lsp-ui.
@sebastiencs no it's not based on GTK. It's using Cocoa. I think the implementation detail is somehow different from the GTK one. See GNU manual: NS builds do not clip child frames at the parent frameโs edges, allowing them to be positioned so they do not obscure the parent frame while still being visible themselves.
from lsp-ui.
It seems not determined by make-frame-invisible as I do see it disappear and appear again periodically. The positioning is bad though.
from lsp-ui.
@fuxialexander Thank for you feedback
IIRC there are 2 bugs ? The wrong position and the child frame staying invisible ?
Can you test if the last commit d050b4f fix the position ?
from lsp-ui.
OMG I know the problem: if set the position of a invisible frame, the frame gets corrupted.
Should be fixed in pr #30.
Thanks for https://emacs-china.org/t/topic/4662/18
from lsp-ui.
If we move/resize the frame after making it visible, it makes a
flickering effect.
So we do it only on systems where the bug is present (os x)
Can you report the bug to bug-gnu-emacs
?
(let* ((window (display-buffer-in-child-frame
(get-buffer-create "test")
'((child-frame-parameters . ((left . 10)
(no-accept-focus . t)
(width . 50)
(height . 10)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(left-fringe . 0)
(right-fringe . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(unsplittable . t)
(undecorated . t)
(background-color . "red")
(top . 10)
(visibility . nil)
(mouse-wheel-frame . nil)
(no-other-frame . t))))))
(frame (window-frame window))
(count 0))
(while (< count 5)
(if (oddp count)
(make-frame-invisible frame)
(set-frame-parameter frame 'left (+ 10 (* count 100)))
(set-frame-parameter frame 'top (+ 10 (* count 100)))
(make-frame-visible frame))
(sit-for 1)
(setq count (1+ count)))
(delete-frame frame))
from lsp-ui.
Thanks, with this snippet, I can always reproduce the bug.
Just reported it to bug-gnu-emacs
as BUG #29953. Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29953
from lsp-ui.
@jiegec So can I revert 651f935 and b6523db ?
from lsp-ui.
Yes, those are no longer needed with a upstream Emacs. Thank you.
from lsp-ui.
Related Issues (20)
- Random Jumps from lsp-ui-doc in terminal mode
- Is there a way to show diagnostics in popup? HOT 5
- setting lsp-ui-sideline-show-code-actions does not change its value HOT 2
- Can't move cursor in `lsp-ui-imenu` through wrapped lines HOT 1
- Changing semantic token face category of specific tokens? HOT 1
- doc-render issue in 29 HOT 6
- Long file paths in lsp-ui-peek-find show only prefix HOT 1
- lsp-ui-sideline pop message break line on emacs 29.0.60 HOT 11
- webkit lsp-ui-doc popup not showing up in emacs HOT 1
- lsp-ui-doc overlaps with completion-at-point popup and lsp-ui-doc-position not working
- lsp-ui breaks C-x 1
- lsp-ui-sideline no diagnostics HOT 1
- lsp-ui-doc-hide make emacs not responding unless press a arrow key HOT 2
- lsp-lens crashes, and get wrong-type-argument message HOT 1
- Add HTML space rendering to lsp-ui-doc
- LSP signature when typing function args HOT 2
- lsp-ui-doc-position 'at-point not working on terminal Emacs HOT 1
- code actions shown for entire line instead of only for issue at point HOT 1
- Bug: Warnings "Invalid face reference: lsp-flycheck-info-unnecessary" when using lsp-ui-sideline HOT 1
- Flymake support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-ui.