Subject: bug#74750: clone-frame and make-frame pixelwise issues

From: martin rudalics <[email-masked]>
Date: Mon, 16 Dec 2024 10:23:13 +0100

> Now, about clone-frame. Are there any objections to the below
 > implementation that uses text-pixels?
...
 > When
 > PIXELWISE is non-nil or if `frame-resize-pixelwise' is non-nil, and frame
 > is not text-only, clone the originating frame's pixel size.

I'd write that as

   If PIXELWISE or `frame-resize-pixelwise' is non-nil and FRAME's terminal
   is not text-only, use the pixel size of FRAME for the cloned frame.
   Otherwise, use the number of columns and lines of FRAME for the cloned
   frame.

The behavior of the 'fullscreen' parameter might be queer if
'frame-resize-pixelwise' is nil and PIXELWISE is non-nil but that's to
be expected.

 > I may be able to test on GTK early this week, but I think you have GNU
 > Linux/GTK on your end?

I've tried here with a GTK-3 and a Motif build and have seen no
problems.

What I've seen is a slight misbehavior in setting up the 'fullscreen'
parameter on the GTK build (so it's not related to your function).  With

(setq frame-resize-pixelwise t)
(setq frame-inhibit-implied-resize t)

setting it to 'maximized' works as expected but setting it to
'fullheight' leaves a gap at the bottom.  Surprisingly, cloning a
'fullheight' frame with your function removes the gap.  The Motif frames
do not have the problem so it might be tool bar related but that should
affect the maximized frame as well.  I'll look into this later but would
be interested if you see the same with a GTK build:

To test:

(setq frame-resize-pixelwise t)
(setq frame-inhibit-implied-resize t)
(set-frame-parameter nil 'fullscreen 'fullheight)

martin