emacs-devel
[Top][All Lists]
Advanced

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

Re:Re: Emacs's set-frame-size can not work well with gnome-shell?


From: tumashu
Subject: Re:Re: Emacs's set-frame-size can not work well with gnome-shell?
Date: Sat, 11 Jan 2020 09:29:49 +0800 (CST)






--
发自我的网易邮箱手机智能版
<br/><br/><br/>


----- Original Message -----
From: "martin rudalics" <address@hidden>
To: tumashu <address@hidden>, "address@hidden" <address@hidden>
Sent: Fri, 10 Jan 2020 10:56:39 +0100
Subject: Re: Emacs's set-frame-size can not work well with gnome-shell?

 > When I use child-frame with gnome-shell, I find that set-frame-size is very slow and can not resize at all.
 > Is it emacs's problem or gnome problem?
 >
 >
 > ```
 > (defun open-test (buffer)
 >    (display-buffer-in-child-frame
 >     buffer '((child-frame-parameters
 >               . ((width . 40)
 >                  (height . 10)
 >                  (top . 50)
 >                  (left . 50)
 >                  )))))
 >
 > (defun resize-test (frame)
 >    (set-frame-height frame 20))
 >
 > (setq-local test-buffer (get-buffer-create "test child-frame"))
 > (setq-local test-frame (window-frame (open-test test-buffer)))
 >
 > (resize-test test-frame)
 > ```
 > The below links are relate infos of this problem:
 >
 > 1. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1733
 >
 > 2. https://github.com/tumashu/company-posframe/issues/17
 >
 > 3. https://github.com/tumashu/company-posframe/issues/2

Both, 'display-buffer-in-child-frame' and 'set-frame-height', should
be written in a way that the child frame surely fits into its parent.
If you don't, the window manager might do strange things.

Sorry, i do not understand this, more detail or an example?

Also, I would disable all decorations that are not strictly needed.
For example, with a GTK build using your parameters I get a tool bar
on the child frame as soon as I type some character into it (which
might be an Emacs bug in one or the other way).  That tool bar is
truncated and GTK may not behave well with truncated tool bars.  See
section 29.14 of the Elisp manual for what better not to do on child
frames.

i think it is not toolbar's problem,posframe use childframe without toolbar, has resize problem too,



If neither of these helps, we would have to look into how Gnome-shell
treats child windows.  Gnome-shell seems particular (see Bug#38452). 

i think it may be gnome-shell problem, for other wm has no this problem

martin

reply via email to

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