From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#18657: 24.4.50; positioning frames on multi-monitor displays Date: Tue, 7 Oct 2014 11:29:29 -0700 (PDT) Message-ID: <9a22e7a5-0b06-4ca3-8698-11dfebd8e62d@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1412708145 10161 80.91.229.3 (7 Oct 2014 18:55:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2014 18:55:45 +0000 (UTC) To: 18657@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 20:30:33 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XbZWq-00034N-GV for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2014 20:30:32 +0200 Original-Received: from localhost ([::1]:60346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZWp-00076g-Rg for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2014 14:30:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZWY-00076E-DV for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:30:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZWP-0002cx-66 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:30:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZWP-0002co-42 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:30:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XbZWN-0000ZV-UT for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:30:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Oct 2014 18:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18657 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14127065992166 (code B ref -1); Tue, 07 Oct 2014 18:30:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2014 18:29:59 +0000 Original-Received: from localhost ([127.0.0.1]:36875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XbZWI-0000Yr-TE for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:29:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43081) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XbZWH-0000Yj-30 for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:29:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZW8-0002Ru-D4 for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:29:56 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZW8-0002Ri-A4 for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:29:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZW0-00070O-Hf for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:29:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZVs-0002Qo-Vg for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:29:40 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:35254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZVs-0002Qk-PM for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:29:32 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s97ITUgh010733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Oct 2014 18:29:31 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s97ITUCQ028660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 7 Oct 2014 18:29:30 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s97ITTOG028649 for ; Tue, 7 Oct 2014 18:29:30 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94256 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=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1'