From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.bugs Subject: bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET) Date: Tue, 14 Jan 2014 10:50:18 +0100 Message-ID: <87iotmao4l.fsf@bzg.ath.cx> References: <87mwj0glf4.fsf@bzg.ath.cx> <52D427EA.5090609@gmx.at> <87txd7g0ew.fsf@bzg.ath.cx> <52D43FEA.7010602@gmx.at> <87y52jy52o.fsf@bzg.ath.cx> <52D4EBAE.2060903@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389693072 27529 80.91.229.3 (14 Jan 2014 09:51:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 09:51:12 +0000 (UTC) Cc: 16430@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 14 10:51:18 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 1W30eU-0002W0-3u for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 10:51:18 +0100 Original-Received: from localhost ([::1]:47297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W30eT-0003bs-Jk for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 04:51:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W30eK-0003bZ-MF for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 04:51:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W30eE-0003rM-Qk for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 04:51:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W30eE-0003rI-NU for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 04:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W30eE-0007EW-F3 for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 04:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jan 2014 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16430 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16430-submit@debbugs.gnu.org id=B16430.138969302627745 (code B ref 16430); Tue, 14 Jan 2014 09:51:02 +0000 Original-Received: (at 16430) by debbugs.gnu.org; 14 Jan 2014 09:50:26 +0000 Original-Received: from localhost ([127.0.0.1]:49734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W30dd-0007DQ-Gy for submit@debbugs.gnu.org; Tue, 14 Jan 2014 04:50:25 -0500 Original-Received: from mail-wi0-f180.google.com ([209.85.212.180]:61268) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W30db-0007DH-1F for 16430@debbugs.gnu.org; Tue, 14 Jan 2014 04:50:23 -0500 Original-Received: by mail-wi0-f180.google.com with SMTP id d13so449860wiw.7 for <16430@debbugs.gnu.org>; Tue, 14 Jan 2014 01:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=XYAZTIg4at9bg2MHovzwGQ4OqMS1T89ye/zIciPVQAI=; b=qbp5lgEQB1JpLquiRWqqD6tPGJNGzdIYihDo1jDFk33vFJEV9+qn0eS5Y0o0DX++ht +8uF4k4f9HLbH280j7waybHYKSv6Dq1VUMnG3Nst3GAdQfgm1k6NZGrut73JLj/9VlMW /SiynDLeY/gygxOVj5TxdHMDbsV3302Nt2cycuu/uJKQk+9RgtTGSSGW37iFVsSZqO5+ K/VQyQ63QC9PveTAr7VCLmHACV+WcuuAsCn6Ky2Rd0ZT0uHiAfiZ9tcjqNerEilRY3wc 1+69FSOSM5cT8455cJ3WA6n62EZYoMXPu5wcTEukI0uVjBpP1VJQSiRid71k5X/K5Usf nAPg== X-Received: by 10.194.236.9 with SMTP id uq9mr26169906wjc.31.1389693022146; Tue, 14 Jan 2014 01:50:22 -0800 (PST) Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPSA id hy8sm30254wjb.2.2014.01.14.01.50.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 01:50:21 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id E3B491C20860; Tue, 14 Jan 2014 10:50:18 +0100 (CET) In-Reply-To: <52D4EBAE.2060903@gmx.at> (martin rudalics's message of "Tue, 14 Jan 2014 08:47:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:83449 Archived-At: martin rudalics writes: > This hints at the org buffer having some special character heights in > it. Could this be that the Org Export dispatch UI is using `header-line-format'? >> What happens is that, when `window--resizable-p' is called with the >> pixelwise parameter set to `t' (from within `window-resize'), then >> the delta (as pixel height) is too high > > Can you tell me what delta is in both fullscreen versions? I will give you this info when I have more time. >> and `window--resizable-p' >> returns nil -- and window-resize an error. > > Apparently `window-resize-no-error' calls `window--resizable-p' with > PIXELWISE nil yielding t while `window-resize' calls it with PIXELWISE t > yielding nil. So rewriting `window-resize-no-error' as > > > (defun window-resize-no-error (window delta &optional horizontal ignore pixelwise) > "Resize WINDOW vertically if it is resizable by DELTA lines. > This function is like `window-resize' but does not signal an > error when WINDOW cannot be resized. For the meaning of the > optional arguments see the documentation of `window-resize'. > > Optional argument PIXELWISE non-nil means interpret DELTA as > pixels." > (unless pixelwise > (setq delta > (if horizontal > (* delta (frame-char-width (window-frame window))) > (* delta (frame-char-height (window-frame window)))))) > > (when (window--resizable-p > window delta horizontal ignore nil nil nil t) > (window-resize window delta horizontal ignore t))) > > > should fix it. Maybe I should just wrap this into a `condition-case' > instead of doing my own checking. With the defun above, I don't have the error anymore but the window is not resized, it's just half of the frame. > BTW what do (frame-pixel-height) and (frame-height) respectively give in > the two fullscreen versions? Fullscreen from the window manager: 768 Fullscreen from toggle-frame-fullscreen: 746 (I vaguely remember that the difference of 768-746=22 is the same difference I had for the deltas... need to double-check.) -- Bastien