[Top][All Lists]

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

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

From: martin rudalics
Subject: Re: Emacs's set-frame-size can not work well with gnome-shell?
Date: Fri, 10 Jan 2020 10:56:39 +0100

> 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.

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

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


reply via email to

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