From: Drew Adams <drew.adams@oracle.com>
To: Subhan Michael Tindall <SubhanT@familycareinc.org>,
help-gnu-emacs@gnu.org
Subject: RE: Maximize/restore frame function
Date: Sun, 5 Oct 2014 12:23:55 -0700 (PDT) [thread overview]
Message-ID: <d4b2150e-e565-4749-b2ec-00ca32ca0f8a@default> (raw)
In-Reply-To: <07aa7063841d4e43a94b6dae1f6a41a0@fcmailsvr2.familycareinc.org>
> > As Oscar indicated, Emacs 24.4 has this.
> >
> > You can also toggle maximization (but not fullscreen), on all
> > platforms in all Emacs versions (starting with Emacs 20), using
> > library `frame-cmds.el', which you can get from Emacs Wiki (or
> > MELPA), http://www.emacswiki.org/emacs-en/download/frame-cmds.el
>
> The commands are exactly what I want, but don't work properly with a
> multi-monitor setup.
>
> Maximize & restore will jump the frame from left monitor to right &
> vice versa. It doesn't appear to be tracking the original location
> either.
>
> So, for example, when I maximize a frame in the left monitor(which
> does not have a menu bar), the frame is moved to the right monitor,
> maximized for that monitor, and igores the menu bar so oversizes the
> frame.
I see. Sorry about that.
I don't have a multi-monitor setup, so I can't easily look into
this. Perhaps you or someone else has a suggestion, to improve
the behavior in this context.
You might be able to use `debug-on-entry' with `maximize-frame'
or `restore-frame', to see better what the problem is and possibly
what a good correction might be.
I suspect that the problem is that the only info saved for later
restoring is the original values of frame parameters `left', `top',
`width', and `height', and that restoring those in another monitor
is not sufficient.
But I wonder anyway why maximizing or restoring switches to using
another monitor (does it do so systematically, or only sometimes?).
Perhaps it is easy to prevent that? Then the saved info would
presumably be sufficient to DTRT.
IOW, perhaps you could try first to find out why it is moving
the frame to the other monitor, and see if you can prevent that.
Or perhaps you can come up with other info (e.g. frame parameters)
to save, so that restoring/maximizing to a different monitor DTRT.
I know nothing about using multiple monitors with Emacs. In the
Elisp manual (node `Multiple Terminals', formerly `Multiple
Displays'), I see that there are some new (Emacs 24.4) functions,
`display-monitor-attributes-list' and `frame-monitor-attributes'.
Perhaps they would be a good starting point for looking into this.
[FWIW, I just filed doc bug #18636, about the argument to
`display-monitor-attributes-list'.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18636]
I notice, for example, that this Emacs 24.3 text in that node:
On some "multi-monitor" setups, a single X display outputs to
more than one monitor. Currently, there is no way for Emacs
to distinguish between the different physical monitors.
was replaced by this text for Emacs 24.4:
On some "multi-monitor" setups, a single X display outputs to
more than one physical monitor. `display-monitor-attributes-list'
and `frame-monitor-attributes' can be used to obtain information
about each physical monitor on multi-monitor setups.
I don't see anything, offhand, that speaks to how to control
which monitor something gets displayed on. There is frame
parameter `display', but I'm not sure whether setting this is
a way to control which monitor is used. Perhaps you could check.
If you do decide to look into this, it's best to follow up with
me off list wrt debugging and details. If people have general
suggestions about this then of course the list is appropriate
for that.
prev parent reply other threads:[~2014-10-05 19:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 17:31 Maximize/restore frame function Subhan Michael Tindall
2014-10-03 18:50 ` Óscar Fuentes
2014-10-04 5:49 ` Drew Adams
2014-10-05 18:13 ` Subhan Michael Tindall
2014-10-05 19:23 ` Drew Adams [this message]
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=d4b2150e-e565-4749-b2ec-00ca32ca0f8a@default \
--to=drew.adams@oracle.com \
--cc=SubhanT@familycareinc.org \
--cc=help-gnu-emacs@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.
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).