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: Thu, 15 Sep 2022 11:43:03 +0000

------- Original Message -------
On Thursday, September 15th, 2022 at 7:17 AM, Robert Pluim <rpluim@gmail.com> 
wrote:


> > > > > > On Wed, 14 Sep 2022 15:09:55 +0000, uzibalqa uzibalqa@proton.me 
> > > > > > said:
> 
> 
> uzibalqa> Could emacs get to understand the monitor within which the initial 
> frame
> 
> >>
> 
> uzibalqa> gets displayed and be able to center the frame in that monitor?
> 
> >>
> 
> >>
> 
> >> `frame-monitor-attributes' will give you the same information as`
> 
> >> display-monitor-attributes-list', but for the monitor where the
> 
> >> currently selected frame is displayed.
> 
> >>
> 
> >>
> 
> >> Robert
> 
> >> --
> 
> 
> uzibalqa> frame-monitor-attributes gives me
> 
> 
> uzibalqa> ((geometry 1080 1152 1366 768) (workarea 1080 1152 1311 768) 
> (mm-size 344 194)
> 
> 
> uzibalqa> (frames #<frame scratch 0x1c111f0> #<frame Speedbar 0x30cefc0>) 
> (source . "Gdk"))
> 
> 
> uzibalqa> How do I interpret this, and how can I use this information?
> 
> 
> Well, you do
> 
> (alist-get 'geometry (frame-monitor-attributes))
> 
> which gives you a list, of which the 3rd element is the width of
> the monitor, which you can use in Gregoryʼs example function.
> 
> Robert
> --

Would (frame-position) and the first two elements in (alist-get 'geometry 
(frame-monitor-attributes))
give me the same information?




reply via email to

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