[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: Dmitry Gutov
Subject: Re: Emacs's set-frame-size can not work well with gnome-shell?
Date: Thu, 16 Jan 2020 02:53:48 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 15.01.2020 11:08, martin rudalics wrote:
>> That's easy to check: Just create a new undecorated, non-child frame and
 >> see whether you can resize it.
 > Any code I can try?

(setq frame (make-frame '((undecorated . t))))

to make such a frame and for example

(set-frame-size frame 40 40)

to resize it.  Try other values as well to verify.

This works just fine, with various values. So that's it for the "undecorated" idea.

Maybe it's the same issue and maybe the effect multiplies on HiDPI
displays.  Here (no HiDPI) I can use the following, slightly modified,
version of tumashu's test case:

(defun open-test (buffer)
    buffer '((child-frame-parameters
              . ((width . 40)
                 (height . 10)
                 (top . 50)
                 (left . 50)
         (drag-with-mode-line . t)

(defun resize-test (frame)
   (set-frame-height frame 20))

(defun move-test (frame)
   (set-frame-position frame 0 0))

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

(resize-test test-frame)
;(move-test test-frame)

Does it move 'test-frame'  when you evaluate the last (commented out) form?

Yes. And I can evaluate (set-frame-position test-frame x y) with different arguments. All are honored (positive or negative). The child frame moves.

And if it moves so far that it doesn't fit the bounds of the parent frame, the extra area is cut off by the WM. Which is probably the expected behavior.

Can you move around 'test-frame' by mouse-dragging its mode line?

I can't make it work at all, neither in the child frame, nor in any normal frame, independent of how the frame parameter was set.

Moving the mode-line with the mouse to resize windows (when e.g. minibuffer is active) totally works, but moving the frame this way when minibuffer is inactive doesn't work anywhere.

reply via email to

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