unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 18657@debbugs.gnu.org
Subject: bug#18657: 24.4.50; positioning frames on multi-monitor displays
Date: Tue, 7 Oct 2014 11:29:29 -0700 (PDT)	[thread overview]
Message-ID: <9a22e7a5-0b06-4ca3-8698-11dfebd8e62d@default> (raw)

This is a followup to the thread for bug #18637.  Please see that
thread.

It's not clear to me how to understand/calculate which monitor a given
frame will be displayed on, or how (if at all possible) to control which
monitor is used.

What the code in question does is to (a) save the original `left',
`top', `width', and `height' frame parameter values for a frame, and
then to change those, using `modify-frame-parameters', to resize the
frame to a "maximized" size (in quotes because the size does not
necessarily correspond exactly to what maximize might mean for the
window manager, and window-manager maximization is not employed).

The "restore" part of the code then calls `modify-frame-parameters'
to set the `left' etc. parameters back to the saved (original) values.
(The values are saved in new frame paramters, `restore-left', etc.)

The code does not delete or create any frames.  It just sets those frame
parameters.  The problem encountered is that the monitor in which the
frame is displayed changes.  The aim is to keep the frame on the same
monitor, regardless of the size change.

The OP reporting the problem is not, I think, on MS Windows, but I test
the code only on Windows.  The problem reported is likely on more than
one platform.  I would be interested in a platform-independent solution.

The code in question is commands `maximize-frame' and `restore-frame' in
this library: http://www.emacswiki.org/emacs-en/download/frame-cmds.el.
This other library is required by that one, in general:
http://www.emacswiki.org/emacs-en/download/frame-fns.el.


In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-09-15 on LEG570
Bzr revision: 117884 dancol@dancol.org-20140915050944-sqsajysnwef51f9m
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





             reply	other threads:[~2014-10-07 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 18:29 Drew Adams [this message]
2014-10-07 21:18 ` bug#18657: 24.4.50; positioning frames on multi-monitor displays Drew Adams
2014-10-07 23:56   ` Drew Adams
2021-07-13 22:00   ` bug#18637: " Lars Ingebrigtsen
2021-07-13 22:20     ` bug#18657: [External] : " Drew Adams

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=9a22e7a5-0b06-4ca3-8698-11dfebd8e62d@default \
    --to=drew.adams@oracle.com \
    --cc=18657@debbugs.gnu.org \
    /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).