all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 16430@debbugs.gnu.org
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	[thread overview]
Message-ID: <87iotmao4l.fsf@bzg.ath.cx> (raw)
In-Reply-To: <52D4EBAE.2060903@gmx.at> (martin rudalics's message of "Tue, 14 Jan 2014 08:47:58 +0100")

martin rudalics <rudalics@gmx.at> 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





  reply	other threads:[~2014-01-14  9:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 11:39 bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET) Bastien Guerry
2014-01-13 17:52 ` martin rudalics
2014-01-13 19:13   ` Bastien
2014-01-13 19:35     ` martin rudalics
2014-01-13 20:55       ` Bastien
2014-01-14  7:47         ` martin rudalics
2014-01-14  9:50           ` Bastien [this message]
2014-01-14 10:45             ` martin rudalics
2014-01-14 16:30               ` Bastien
2014-01-14 18:09                 ` martin rudalics
2014-01-14 20:18                   ` Bastien
2014-01-15  8:08                     ` martin rudalics
2014-01-17 14:19                       ` Bastien
2014-01-17 19:07                         ` martin rudalics
2014-01-18 12:19                         ` martin rudalics
2014-01-19 16:31                           ` Bastien
2014-01-19 17:31                             ` martin rudalics
2014-01-20 14:18                               ` Bastien
2014-01-20 18:18                                 ` martin rudalics
2014-01-20 18:25                                   ` Bastien
2014-01-22 10:35                                     ` martin rudalics
2014-01-22 11:06                                       ` Bastien
2014-01-14 20:22                   ` Bastien
2014-01-15  8:09                     ` martin rudalics
2014-01-17 14:44                       ` Bastien
2014-01-14 16:34             ` Bastien
2014-01-14 18:09               ` martin rudalics
2014-01-14 20:32                 ` Bastien
2014-01-15  8:09                   ` martin rudalics
2014-01-17 14:48                     ` Bastien
2014-01-13 20:56       ` Bastien
2014-01-14  7:48         ` martin rudalics
2014-01-14  9:45           ` Bastien
2014-01-22 11:07   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iotmao4l.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=16430@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.