help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Frame shifted upwards upon changing font size


From: uzibalqa
Subject: Re: Frame shifted upwards upon changing font size
Date: Tue, 13 Sep 2022 13:45:17 +0000

------- Original Message -------
On Tuesday, September 13th, 2022 at 1:22 PM, Gregory Heytings 
<gregory@heytings.org> wrote:


> > Looks as if we need a new function that ensures the frame is centered.
> 
> 
> (defun frame-center (&optional frame display)
> (interactive)
> (set-frame-position
> frame
> (/ (- (display-pixel-width display) (frame-pixel-width frame)) 2)
> (/ (- (display-pixel-height display) (frame-pixel-height frame)) 2)))

I have different monitors with different sizes, and the function is 
transferring the frame to a different monitor.




reply via email to

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