From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#18637: 24.4.50; doc of frame parameter DISPLAY vs actual value on MS Windows Date: Tue, 07 Oct 2014 19:35:28 +0100 Message-ID: References: <83tx3flxn2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412707070 27955 80.91.229.3 (7 Oct 2014 18:37:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2014 18:37:50 +0000 (UTC) To: 18637@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 20:37:39 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 1XbZde-0005nA-I2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2014 20:37:34 +0200 Original-Received: from localhost ([::1]:60381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZde-0000jw-4p for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2014 14:37:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZdF-0000Wa-U9 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:37:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZd8-000560-8V for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:37:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZd8-00055k-5c for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XbZd7-0000lS-Lt for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:37:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <12fc196e-cc82-4f22-8d2f-cede95542ea7@default> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Oct 2014 18:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18637 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.14127069662855 (code B ref -1); Tue, 07 Oct 2014 18:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2014 18:36:06 +0000 Original-Received: from localhost ([127.0.0.1]:36890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XbZcD-0000jy-0q for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:36:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44853) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XbZc9-0000jm-V9 for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:36:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZc1-0004kh-TD for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:36:01 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZc1-0004kd-Pf for submit@debbugs.gnu.org; Tue, 07 Oct 2014 14:35:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZbv-0000LW-H9 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:35:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbZbp-0004jJ-8A for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:35:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbZbo-0004j7-P1 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 14:35:40 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XbZbn-00056Y-5I for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2014 20:35:39 +0200 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2014 20:35:39 +0200 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2014 20:35:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 66 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) Cancel-Lock: sha1:mOBm0E12ZCCYrBsBlvFinG8oHRI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:94253 Archived-At: On Tue 07 Oct 2014, Eli Zaretskii wrote: >> The relevant code snippet is what I sent earlier >> (`frcmds-available-screen-pixel-bounds'), plus functions >> `maximize-frame' and `restore-frame', here: >> http://www.emacswiki.org/emacs-en/download/frame-cmds.el> >> In those two commands I do the following. >> >> For `maximize-frame': >> >> 1. Save the current `left' etc. as parameters `restore-left' etc. >> 2. Calculate the available screen size, using >> `frcmds-available-screen-pixel-bounds'. >> 3. Set `left' and `top' both to 0 and `width' and `height' to the >> calculated screen size. >> >> For `restore-frame': >> >> Restore `left' etc. from the saved values `restore-left' etc. > > That's a lot of code, and I have no way of trying it. I have a multi-monitor system, but I'm not going to perform experiments without a clearer recipe. I did try rearranging the physical monitor layout as follows (which makes it quite easy to lose the position of the cursor). Things may get more confusing with three or more monitors... ;; Two monitors arranged physically as: ;; +---------+ ;; | | ;; | 2 |+---------+ ;; | || | ;; +---------+| 1 | ;; | | ;; +---------+ (display-monitor-attributes-list) ;; ==> (((geometry 0 0 1920 1080) (workarea 0 0 1920 1050) (mm-size 677 381) (name . "\\\\.\\DISPLAY1") (frames)) ((geometry -1680 -646 1680 1050) (workarea -1680 -646 1680 1050) (mm-size 593 370) (name . "\\\\.\\DISPLAY2") (frames))) (display-pixel-height) ;; ==> 1726 (display-pixel-width) ;; ==> 3600 (display-mm-height) ;; ==> 609 (display-mm-width) ;; ==> 1269 > I think at this stage it is best for the user in question to try some > simple code that reports frame coordinates and creates a frame given > specific coordinates, and then see what that means for us. > > Oh, and I think this is no longer about the docs, so probably a new > bug report is in order, specifically about restoring frames on > multi-monitor displays. True, as long as the meaning of geometry/workarea and the coordinate system are given a little more detail in the docs. AdnyM