From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fran Litterio Newsgroups: gmane.emacs.devel Subject: Bug in function =?utf-8?b?eF9jYWxjX2Fic29sdXRlX3Bvc2l0aW9u?= in xterm.c and w32term.c Date: Tue, 23 Jun 2015 16:12:43 +0000 (UTC) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1435076006 30594 80.91.229.3 (23 Jun 2015 16:13:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2015 16:13:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 23 18:13:17 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Z7Qoy-0001l1-3r for ged-emacs-devel@m.gmane.org; Tue, 23 Jun 2015 18:13:12 +0200 Original-Received: from localhost ([::1]:46222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Qox-0004Xm-AJ for ged-emacs-devel@m.gmane.org; Tue, 23 Jun 2015 12:13:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Qok-0004Xf-Tw for emacs-devel@gnu.org; Tue, 23 Jun 2015 12:12:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Qog-00019j-P0 for emacs-devel@gnu.org; Tue, 23 Jun 2015 12:12:58 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Qog-00019R-IR for emacs-devel@gnu.org; Tue, 23 Jun 2015 12:12:54 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z7Qob-0001Xd-RF for emacs-devel@gnu.org; Tue, 23 Jun 2015 18:12:50 +0200 Original-Received: from interv03.i.subnet.rcn.com ([146.115.9.234]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jun 2015 18:12:49 +0200 Original-Received: from flitterio by interv03.i.subnet.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jun 2015 18:12:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 146.115.9.234 (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187425 Archived-At: Using the latest sources, I see the following behavior on a machine with two 1920x1080 monitors arranged side-by-side: $ runemacs.exe -Q In buffer *scratch*: (setq f (make-frame '((left . -1)))) # (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 rightmost monitor): (set-frame-position f (- 3155 1920) 0) The root cause appears to be that function x_calc_absolute_position (in files xterm.c and w32term.c) calls function x_display_pixel_width to obtain the pixel width of the current monitor, but x_display_pixel_width has changed to give the combined pixel width of all monitors. I expect the same problem would happen making a frame with a 'top parameter of -1 with multiple vertically stacked monitors (due to x_display_pixel_height having changed similarly). If I can get a fix working, I'll send a patch. -- Fran Litterio