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#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame Date: Sat, 03 Oct 2015 12:28:31 +0100 Message-ID: <86twq8yyw0.fsf@gmail.com> References: <560E4263.8020309@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443871764 9794 80.91.229.3 (3 Oct 2015 11:29:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Oct 2015 11:29:24 +0000 (UTC) To: 21415@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 03 13: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 1ZiL02-0003ag-40 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Oct 2015 13:29:10 +0200 Original-Received: from localhost ([::1]:37960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiL01-0003hW-6a for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Oct 2015 07:29:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiKzy-0003fk-1d for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiKzu-0007eR-Oi for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiKzu-0007eG-LQ for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZiKzu-0006Vl-DN for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:29:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Oct 2015 11:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21415 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.144387174025021 (code B ref -1); Sat, 03 Oct 2015 11:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2015 11:29:00 +0000 Original-Received: from localhost ([127.0.0.1]:52846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZiKzs-0006VU-1Q for submit@debbugs.gnu.org; Sat, 03 Oct 2015 07:29:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36239) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZiKzp-0006VL-GI for submit@debbugs.gnu.org; Sat, 03 Oct 2015 07:28:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiKzo-0007cH-8U for submit@debbugs.gnu.org; Sat, 03 Oct 2015 07:28:57 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiKzo-0007cD-4u for submit@debbugs.gnu.org; Sat, 03 Oct 2015 07:28:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiKzn-0003et-5S for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:28:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiKzj-0007Zf-UW for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:28:55 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiKzj-0007ZD-Nt for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 07:28:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZiKzc-000392-2y for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 13:28:44 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Oct 2015 13:28:44 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Oct 2015 13:28:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:GKnagPR7RGH3WSdmZ7VVtpforUU= 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: 208.118.235.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:107252 Archived-At: On Fri 02 Oct 2015, martin rudalics wrote: > Find attached the most recent version of the patch. Fixes are mainly > for Lucid/Motif but something might change for other platforms as well. > > @@ -3166,15 +3171,25 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) > prop = parms[i]; > val = values[i]; > > - if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX)) > + if (EQ (prop, Qwidth)) > { > width_change = 1; > - width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; > + if (RANGED_INTEGERP (0, val, INT_MAX)) > + width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; > + else if (FLOATP (val) > + && XFLOAT_DATA (val) >= 0 > + && (int) XFLOAT_DATA (val) <= INT_MAX) > + width = (int) XFLOAT_DATA (val); > } This changes the logic to set width_change even when Qwidth is an out of range integer: is that intended ? > - else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX)) > + else if (EQ (prop, Qheight)) > { > height_change = 1; > - height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); > + if (RANGED_INTEGERP (0, val, INT_MAX)) > + height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); > + else if (FLOATP (val) > + && XFLOAT_DATA (val) >= 0 > + && (int) XFLOAT_DATA (val) <= INT_MAX) > + height = (int) XFLOAT_DATA (val); Similarly for height_change. AndyM