emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 16 Jan 2020 19:33:31 +0100

> My intuitive understanding is that the WM considers this frame
> fixed-size for some reason. And when mouse dragging of the top border
> is initiated, it is indeed resized by moving the top border.
>
> And then some other piece of code somewhere sees that and thinks, hey,
> this window must be X height! And fixes the situation by resizing it
> back (but moving the bottom border). Which makes the frame move.

Tracking that red border is something Emacs internal and is eventually
translated to gtk_window_resize calls just like 'set-frame-size' and
setting the 'height' or 'width' frame parameters.  Hence, all your
earlier attempts to resize the frame would then have resulted in frame
movements as well.

What I'm more concerned about here is that mutter actually _moves_ the
frame although there should not be any decorations that would make such
movement possible and not that dragging the red border does not resize
the frame because I already knew from your earlier observations that
resizing child frames is not supported.

You could try one more thing: Set the frame's 'override-redirect'
parameter to bypass the WM like


(custom-set-faces
 '(internal-border ((t (:background "red")))))

(defun open-test (buffer)
  (display-buffer-in-child-frame
   buffer '((child-frame-parameters
             . ((width . 40)
                (height . 10)
                (top . 50)
                (left . 50)
        (minibuffer . nil)
        (override-redirect . t)
        (border-width . 0)
        (internal-border-width . 10)
        (drag-internal-border . t)
        (drag-with-mode-line . t)
                )))))

(setq-local test-buffer (get-buffer-create "*test child-frame*"))
(setq-local test-frame (window-frame (open-test test-buffer)))


And also make sure that 'frame-resize-pixelwise' is t although I doubt
that this would make any difference.  I've tried to read the mutter
source code but hardly found anything revealing.  BTW, did you ever try
shrinking the initial frame instead of growing it?

martin



reply via email to

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