From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18528: 24.3.93; Crash during restoration of frameset from desktop Date: Tue, 23 Sep 2014 18:15:49 +0200 Message-ID: <54219CB5.6080103@gmx.at> References: <83egv3y90k.fsf@gnu.org> <54205FCF.4050503@gmx.at> <83bnq7y13y.fsf@gnu.org> <542109B8.6080107@gmx.at> <8361gexsrg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411489418 20159 80.91.229.3 (23 Sep 2014 16:23:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2014 16:23:38 +0000 (UTC) Cc: 18528@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 23 18:23:31 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 1XWSmQ-0003R8-HO for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Sep 2014 18:17:30 +0200 Original-Received: from localhost ([::1]:54290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSmP-0000Bz-Tw for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Sep 2014 12:17:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSmD-0000Ax-GD for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:17:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWSm3-0001Yl-Kk for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:17:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSm3-0001XU-Hg for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:17:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XWSlx-0006Vl-Pm for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Sep 2014 16:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18528 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141148900025002 (code B ref -1); Tue, 23 Sep 2014 16:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2014 16:16:40 +0000 Original-Received: from localhost ([127.0.0.1]:50134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWSlc-0006VC-21 for submit@debbugs.gnu.org; Tue, 23 Sep 2014 12:16:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40519) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWSlZ-0006V3-Ra for submit@debbugs.gnu.org; Tue, 23 Sep 2014 12:16:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWSlP-0001D3-K2 for submit@debbugs.gnu.org; Tue, 23 Sep 2014 12:16:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSlP-0001Bk-HL for submit@debbugs.gnu.org; Tue, 23 Sep 2014 12:16:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSlC-00007R-Tm for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:16:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWSl5-00018N-Cg for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 12:16:14 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:59228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSkx-00016L-Co; Tue, 23 Sep 2014 12:15:59 -0400 Original-Received: from [88.117.53.39] ([88.117.53.39]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MZxch-1XrhCQ1VaZ-00LmWW; Tue, 23 Sep 2014 18:15:53 +0200 In-Reply-To: <8361gexsrg.fsf@gnu.org> X-Provags-ID: V03:K0:KAf2BNKf7iVrPnl26w1e6/kxrF4dZkPDSs08/S4FGZNSMSZ9QDF ofEk2hVFwAopunyUoTMs0NjR4M+JNHT4xrLvEaEKIXRTD28VubRsaNmSmObjfZkpgqksyVi 4JldKAFiKq7bWMbmu5nvGBGV99sgqbRqNJLJRoc7Z87RS5egkSEP6GqA1qE0LJOx6/ltE2D eIbhhBXPaNcvfSIQ2eisg== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] 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:93660 Archived-At: >> We have to check these values anyway because our window structure might >> be too complex to fit into the rectangle returned by GetClientRect. > > Sorry, I don't think I understand this. GetClientRect just returns > the dimensions of our frame, it doesn't know anything about Emacs > windows. If all values returned by GetClientRect are zero, it's all to obvious that our windows won't fit. But if, for example, rect.right - rect.left is too small to fit our windows, we face a similar same problem and have to handle that anyway. So I'm not sure whether we should separately deal with the case where all rectangle values are zero. >> I never got around to ask you: Do you anywhere see a need to round up >> the values of new_cols and new_lines in cases like this? > > Yes, I think so. I think the reason we didn't see any problems with > that is that GUI windows always over-allocate their glyph matrices, to > be prepared for dealing with the smallest possible font, which is > rarely if ever used. But I think if you actually use that smallest > font for the default face, you will see the problem. I thought it's not needed because in required_matrix_width we use the pixel width when HAVE_WINDOW_SYSTEM is defined. > (Just make sure you don't round up for TTY frames, so as not to add > one extra row there.) martin