From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: set-frame-height glitch [Was: Re: Changes in frame/window code] Date: Wed, 23 Jul 2014 19:05:10 +0400 Message-ID: <53CFCF26.2040105@yandex.ru> References: <53CE6A44.1010708@gmx.at> <53CF9245.7080209@yandex.ru> <53CFAF00.5080705@gmx.at> 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 1406127971 16591 80.91.229.3 (23 Jul 2014 15:06:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jul 2014 15:06:11 +0000 (UTC) Cc: emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 23 17:06:05 2014 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 1X9y7I-0000qU-RT for ged-emacs-devel@m.gmane.org; Wed, 23 Jul 2014 17:06:04 +0200 Original-Received: from localhost ([::1]:45576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9y7I-0005Q0-8l for ged-emacs-devel@m.gmane.org; Wed, 23 Jul 2014 11:06:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9y78-0005JD-5g for emacs-devel@gnu.org; Wed, 23 Jul 2014 11:06:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9y70-0004lN-Jm for emacs-devel@gnu.org; Wed, 23 Jul 2014 11:05:54 -0400 Original-Received: from forward9l.mail.yandex.net ([84.201.143.142]:41289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9y70-0004l5-CY for emacs-devel@gnu.org; Wed, 23 Jul 2014 11:05:46 -0400 Original-Received: from smtp7.mail.yandex.net (smtp7.mail.yandex.net [77.88.61.55]) by forward9l.mail.yandex.net (Yandex) with ESMTP id F0C9DE61707; Wed, 23 Jul 2014 19:05:14 +0400 (MSK) Original-Received: from smtp7.mail.yandex.net (localhost [127.0.0.1]) by smtp7.mail.yandex.net (Yandex) with ESMTP id 97D5915807CC; Wed, 23 Jul 2014 19:05:14 +0400 (MSK) Original-Received: from 70.gprs.mts.ru (70.gprs.mts.ru [213.87.130.70]) by smtp7.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id r5XQU94xnZ-5D10Dfx9; Wed, 23 Jul 2014 19:05:14 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 36679ff0-e6c6-41e0-ae5f-4b6dd8bb8c9f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1406127914; bh=Ft4cUW38Ee5PlqXVI4M03G9T/Wq5wImtLQs0U+BcUU4=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=bF2wDsYs1Zq9iix9ol3N7LsL3jDViuzcVaY+Z7zujUddCWsFVv49lPbaUfZpQbzav hWC4CZt5NwTENxkNkjCKDSFvToluniyk629dE2jkvDUjqpXlh6weJEnnsf6JvclduE kzV37VGfjo/3Fjk5bbOQGzhoIRwIqvOoejlsZqVE= Authentication-Results: smtp7.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <53CFAF00.5080705@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.142 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:173098 Archived-At: On 07/23/2014 04:48 PM, martin rudalics wrote: > With emacs -Q and an internal tool bar evaluate one after the other > > (frame-height) > (set-frame-height nil (1+ (frame-height))) > (frame-height) > > Here the `set-frame-height' shrinks the frame. Nice shot. But, IIUC, this means that set-frame-height goes wrong but should be: === modified file 'src/frame.c' --- src/frame.c 2014-07-21 16:58:12 +0000 +++ src/frame.c 2014-07-23 15:01:44 +0000 @@ -2584,8 +2584,11 @@ { if (NILP (pixelwise)) { - if (XINT (height) != FRAME_LINES (f)) - x_set_window_size (f, 1, FRAME_COLS (f), XINT (height), 0); + int actual = FRAME_LINES (f) - FRAME_TOP_MARGIN (f); + int requested = XINT (height) + FRAME_TOP_MARGIN (f); + + if (requested != actual) + x_set_window_size (f, 1, FRAME_COLS (f), requested, 0); do_pending_window_change (0); } Dmitry