From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18528: 24.3.93; Crash during restoration of frameset from desktop Date: Tue, 23 Sep 2014 21:46:06 +0300 Message-ID: <83zjdqw4y9.fsf@gnu.org> References: <83egv3y90k.fsf@gnu.org> <54205FCF.4050503@gmx.at> <83bnq7y13y.fsf@gnu.org> <542109B8.6080107@gmx.at> <8361gexsrg.fsf@gnu.org> <54219CB5.6080103@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411499859 329 80.91.229.3 (23 Sep 2014 19:17:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2014 19:17:39 +0000 (UTC) Cc: 18528@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 23 21:17:30 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 1XWVab-0000U8-SA for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Sep 2014 21:17:30 +0200 Original-Received: from localhost ([::1]:55490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWVab-0006lt-CI for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Sep 2014 15:17:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWVaQ-0006hV-Fo for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 15:17:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWVaG-0005r1-I0 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 15:17:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWVaG-0005pD-F1 for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 15:17:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XWVJj-000630-AN for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 15:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Sep 2014 19:00:02 +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.141149878323189 (code B ref -1); Tue, 23 Sep 2014 19:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2014 18:59:43 +0000 Original-Received: from localhost ([127.0.0.1]:50244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWVJO-00061w-Ip for submit@debbugs.gnu.org; Tue, 23 Sep 2014 14:59:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48036) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWVJM-00061m-5M for submit@debbugs.gnu.org; Tue, 23 Sep 2014 14:59:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWVJ4-0007RB-QR for submit@debbugs.gnu.org; Tue, 23 Sep 2014 14:59:39 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWVJ4-0007KY-Ky for submit@debbugs.gnu.org; Tue, 23 Sep 2014 14:59:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWV6V-0006LB-Gk for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 14:46:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWV6Q-0003Iz-BW for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 14:46:23 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:48939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWV6Q-0003G6-3d for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 14:46:18 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NCD00B00AMTUR00@mtaout28.012.net.il> for bug-gnu-emacs@gnu.org; Tue, 23 Sep 2014 21:45:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCD006G7ARHDE50@mtaout28.012.net.il>; Tue, 23 Sep 2014 21:45:18 +0300 (IDT) In-reply-to: <54219CB5.6080103@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:93664 Archived-At: > Date: Tue, 23 Sep 2014 18:15:49 +0200 > From: martin rudalics > CC: bug-gnu-emacs@gnu.org > > >> 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. When they are zero, we know we shouldn't even call change_frame_size. > >> 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. Is this a response to what's above or to what's below? > > (Just make sure you don't round up for TTY frames, so as not to add > > one extra row there.)