From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: flitterio@gmail.com (Francis Litterio) Newsgroups: gmane.emacs.bugs Subject: bug#21173: 25.0.50; New frames positioned off screen with multiple monitors Date: Fri, 31 Jul 2015 23:28:05 -0400 Message-ID: <874mkjadqx.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438399764 9323 80.91.229.3 (1 Aug 2015 03:29:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 03:29:24 +0000 (UTC) To: 21173@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 05:29:12 2015 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 1ZLNU0-0002ii-BK for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 05:29:12 +0200 Original-Received: from localhost ([::1]:46654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTz-0007jT-Bu for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2015 23:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTv-0007jB-Mu for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:29:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLNTq-00067I-L7 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:29:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTq-00067E-H3 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZLNTq-0002HP-B2 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: flitterio@gmail.com (Francis Litterio) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Aug 2015 03:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21173 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.14383997348747 (code B ref -1); Sat, 01 Aug 2015 03:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2015 03:28:54 +0000 Original-Received: from localhost ([127.0.0.1]:36208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLNTh-0002H0-P3 for submit@debbugs.gnu.org; Fri, 31 Jul 2015 23:28:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34947) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLNTf-0002Gs-Ic for submit@debbugs.gnu.org; Fri, 31 Jul 2015 23:28:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLNTe-00065z-3g for submit@debbugs.gnu.org; Fri, 31 Jul 2015 23:28:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTe-00065v-1f for submit@debbugs.gnu.org; Fri, 31 Jul 2015 23:28:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTc-0007ix-H6 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:28:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLNTX-00065D-GZ for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:28:48 -0400 Original-Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]:36329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLNTX-000654-9C for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 23:28:43 -0400 Original-Received: by igbij6 with SMTP id ij6so27460494igb.1 for ; Fri, 31 Jul 2015 20:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=TfRFvMrPZyR5H3j7rWgUfyhXlSkz3kTwY3O9MVyunG0=; b=reV1nFeCTto5nQfAg+QlFL4jNi7Dhi56fS/psZP9GMqcEFdk5PsZDAVcT5VpyteQEI 4PIxhlfoMmFwSUDTExWPHFBoEOjigIXMx1UQlr8Cgax4JOz1geFqWn1lKAi07wpjWQS1 B7Im9fSZO6BvjGbEsEYkCMXjDDQFZBYUfVqraPfLvvX3wOzlfavBoT0p+vaSGgGhQLmF vdCAl6tMPpO6gG+cHFmpzWxsy5Cz64r4B0DyqAjEeX7PDeRzixz+DIZWHx2/oeRDW9MK hg0Xlj6xoyAQaWEbDKH2KbrnuYER5A5S8ER7NO2G+LscxzLwx3+ebU0viIfw8/1PmzgA U6oA== X-Received: by 10.50.66.129 with SMTP id f1mr11073898igt.7.1438399722788; Fri, 31 Jul 2015 20:28:42 -0700 (PDT) Original-Received: from puppy.gmail.com (103.sub-70-215-7.myvzw.com. [70.215.7.103]) by smtp.gmail.com with ESMTPSA id o140sm4844517ioe.27.2015.07.31.20.28.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 20:28:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:105257 Archived-At: On Windows, using Emacs built from the latest source, I see the following behavior on a machine with two 1920x1080 monitors arranged side-by-side, such that the right monitor is the primary monitor (i.e., the monitor on which the taskbar is drawn). This monitor arrangement gives frames on the left monitor negative X offsets, which is why this bug happens. $ runemacs.exe -Q In buffer *scratch*: (setq f (make-frame '((left . -1)))) # IZSYSTEM023 015257f0> (frame-parameter f 'left) 3155 The left offset of the new frame appears to be 1920 pixels too far to the right. Evaluating the following form positions the frame to its expected location (abutting the right edge of the right monitor): (set-frame-position f (- 3155 1920) 0) The root cause appears to be that function x_calc_absolute_position (in xterm.c and w32term.c) calls function x_display_pixel_width to obtain the combined pixel width of all monitors, but the code doesn't take into account that one (or more) monitors might have negative X offsets, which can happen on Windows. Thus, the new frame's left offset is miscomputed. Under the X window system, I'm not sure if monitors can have negative X offsets, so this may not be an issue under X. I suspect the same problem would happen when making a frame with a 'top parameter of -1 when the non-primary monitor is positioned above the primary monitor (i.e., has negative Y offsets). -- Fran Litterio flitterio gmail.com In GNU Emacs 25.0.50.4 (i686-pc-mingw32) of 2015-06-30 on PUPPY Repository revision: 5f004117f5bcab9171eaddb2867393ed69ae49bf Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=c:/apps/emacs --without-x --without-xpm --without-png --without-jpeg --without-tiff --without-gif' Configured features: SOUND NOTIFY ACL TOOLKIT_SCROLL_BARS Important settings: value of $LANG: C.ISO-8859-1 locale-coding-system: cp1252 Major mode: Text Minor modes in effect: erc-list-mode: t erc-menu-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t diff-auto-refine-mode: t show-paren-mode: t save-place-mode: t icomplete-mode: t savehist-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t abbrev-mode: t Recent messages: Wrote c:/franl/emacs-bug.txt Saving file c:/franl/emacs-bug.txt... Wrote c:/franl/emacs-bug.txt Saving file c:/franl/emacs-bug.txt... Wrote c:/franl/emacs-bug.txt Saving file c:/franl/emacs-bug.txt... Wrote c:/franl/emacs-bug.txt Mark set [2 times] Quit (No changes need to be saved) Load-path shadows: None found. Features: (rfc2104 mailalias pulse jka-compr find-func sh-script smie executable shadow mail-extr emacsbug calc-alg calc-aent calc-menu rect misearch multi-isearch edmacro kmacro server sort gnus-draft gnus-agent gnus-srvr nnvirtual nndraft nnmh gnus-msg gnus-cite canlock gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap gnus-async gnus-score score-mode gnus-cache gnus-sum fpl-moo fpl-react erc-notify erc-truncate erc-log erc-dcc erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat thingatpt help-mode source-safe ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff grep python json ielm pp sgml-mode csharp-mode cc-langs cl smtpmail sendmail nntp gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc parse-time gnus-spec gnus-int gnus-range message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win nnoo gnus gnus-ems nnheader mail-utils wid-edit etags vc vc-dispatcher dired-aux hexl smerge-mode diff-mode easy-mmode paren man info compile apropos tramp tramp-compat tramp-loaddefs trampver format-spec advice saveplace icomplete xref savehist browse-url shell pcomplete warnings arc-mode archive-mode ange-ftp socks network-stream nsm auth-source cl-macs cl-seq eieio byte-opt gv bytecomp byte-compile cl-extra seq cconv eieio-core cl-loaddefs pcase cl-lib gnus-util mm-util help-fns mail-prsvr password-cache starttls tls dired cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs comint ansi-color ring calc-ext calc calc-loaddefs calc-macs time-stamp time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 multi-tty make-network-process emacs) Memory information: ((conses 8 345101 52543) (symbols 32 43222 2) (miscs 32 278 1325) (strings 16 100168 21170) (string-bytes 1 2854256) (vectors 8 49499) (vector-slots 4 967355 64132) (floats 8 603 1334) (intervals 28 3770 1352) (buffers 516 36))