From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Minimum frame size in Windows Date: Tue, 12 Dec 2006 17:36:07 +0100 Message-ID: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1165941432 14975 80.91.229.10 (12 Dec 2006 16:37:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2006 16:37:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 12 17:37:10 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuAcj-0006Qm-1W for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 17:36:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuAci-0003w8-Gn for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 11:36:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuAc4-0003me-Pi for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:36:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuAc3-0003lp-6M for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:36:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuAc3-0003lm-2t for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:36:15 -0500 Original-Received: from [66.249.92.168] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GuAc2-0000gP-9F for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:36:14 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so2034102ugf for ; Tue, 12 Dec 2006 08:36:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gTSX4zA9kFDCL/V9q6ZyUbqQVF+YWemG/Y/im/78BwuYKuinmlRTF090lzfVtPD1cGPgp4SBqQAPLl3wwUGKLJ3u8dv3E3hfUXZyHwOG3GcUJKccQRrl00e1dz0twmmhwpzgZd7MCece6XBk6NsQN4BjfTyJgORz5t5WX658kB8= Original-Received: by 10.82.165.1 with SMTP id n1mr519446bue.1165941367594; Tue, 12 Dec 2006 08:36:07 -0800 (PST) Original-Received: by 10.82.146.7 with HTTP; Tue, 12 Dec 2006 08:36:07 -0800 (PST) Original-To: "Emacs Devel" Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63634 Archived-At: There's an old hack in src/w32fns.c to avoid the user resizing an Emacs frame below the minimum tracking size (else the user can, for example, make a window showing only a fraction of the window caption, which looks ugly). However, the hack is not working. I propose fixing it with the following straightforward patch. /L/e/k/t/u Index: src/w32fns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v retrieving revision 1.281 diff -u -2 -r1.281 w32fns.c --- src/w32fns.c 1 Dec 2006 13:04:59 -0000 1.281 +++ src/w32fns.c 12 Dec 2006 16:18:44 -0000 @@ -3707,6 +3707,6 @@ and Y positions as well. */ - lppos->cx -= wdiff; - lppos->cy -= hdiff; + lppos->cx = max (lppos->cx - wdiff, GetSystemMetrics (SM_CXMINTRACK)); + lppos->cy = max (lppos->cy - hdiff, GetSystemMetrics (SM_CYMINTRACK)); if (wp.showCmd != SW_SHOWMAXIMIZED @@ -3732,7 +3732,4 @@ case WM_GETMINMAXINFO: - /* Hack to correct bug that allows Emacs frames to be resized - below the Minimum Tracking Size. */ - ((LPMINMAXINFO) lParam)->ptMinTrackSize.y++; /* Hack to allow resizing the Emacs frame above the screen size. Note that Windows 9x limits coordinates to 16-bits. */