unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Сергей Трофимов" <sarg@sarg.org.ru>, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix fit-frame-to-buffer for multi-monitor setup.
Date: Sat, 29 Feb 2020 17:05:28 +0100	[thread overview]
Message-ID: <91a85405-ca57-096c-bb7e-058580b04577@gmx.at> (raw)
In-Reply-To: <CAE0nKzXiM9vV3FQY3kM1T4x4L+7i3Am1OfW1mEdmp2ejvszB1w@mail.gmail.com>

 > I've noticed `fit-frame-to-buffer` results in incorrect frame position
 > when the frame is not a child frame. I've looked into the code and
 > seems that there are two issues: first is that frame monitor is
 > ignored, always first monitor in `display-monitor-attributes-list` is
 > used.

Good.  I never really checked that since I always use only one monitor.
Besides, 'frame-monitor-attributes' should be preferable anyway.

 > Second is that `workarea` and `geometry` are in the form of `(X
 > Y WIDTH HEIGHT)` but code treats them as `(X1 Y1 X2 Y2)`.

I believe the reasoning was to avoid moving the frame whenever it
already appears within its margins and thus constrain it to the region
to the right of and below (X, Y).  But my memory may fail.  Could you
provide an example where the original code results in bad placement?

 > I'm
 > providing a patch that fixes both issues.

Thanks, martin



  reply	other threads:[~2020-02-29 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29 13:10 [PATCH] Fix fit-frame-to-buffer for multi-monitor setup Сергей Трофимов
2020-02-29 16:05 ` martin rudalics [this message]
2020-02-29 18:31   ` Sergey Trofimov
2020-03-01  8:52     ` martin rudalics
2020-03-01 15:46       ` Eli Zaretskii
2020-03-01 19:25         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91a85405-ca57-096c-bb7e-058580b04577@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=sarg@sarg.org.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).