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: Wed, 15 Jan 2020 09:08:19 +0100

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

>> I doubt that at a position of 2037 much resizing can be done.  In either
>> case, the outer height of your child frame _has_ changed from 360 to 720
>> or at least 'frame-geometry' is told so.
>
> When I created it with the appropriate size, frame-geometry reflected it, yes.

Sorry, I misread your message and thought the second 'frame-geometry'
call reflected the frame's state after the failed resizing attempt.  And
I also thought that the outer position returned by 'frame-geometry' is
relative to its parent.  It isn't (correctly so).  Only 'frame-position'
returns the parent-relative value.

>> Is yours by chance a
>> high-resolution display?
>
> Yes, HiDPI. 3840x2160. And I also moved the window to the right side of the 
screen for convenience. So the numbers should be right, and there's certainly 
enough space for the child frame to be resized (it's much smaller than the parent 
frame).
>
>>  >> - Can you reproduce Bug#38452?
>>  >
>>  > Yes. Every evaluation of the form in the first message shifts a simple, 
non-maximized frame a bit up-left by (24 . 22).
>>
>> Maybe that's the core of our problem.  Either mutter doesn't want to
>> put the frame where Emacs asks to put it or we don't understand where
>> mutter has put it.
>
> But that other bug report is about positioning, isn't it? And this discussion 
is about resizing.

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)
  (display-buffer-in-child-frame
   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?
Can you move around 'test-frame' by mouse-dragging its mode line?

martin



reply via email to

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