[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16430: 24.3.50; When fullscreen is triggered from the window manager
From: |
martin rudalics |
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 08:47:58 +0100 |
> 2 windows of equal height.
>
>> Can you trigger it from
>> such a configuration by simply doing M-x fit-window-to-buffer RET?
>
> Yes, from last emacs -Q, even outside Org Export, you need two windows
> and M-x fit-window-to-buffer RET will fail sometimes. But I can't
> provide a reproducible case for now.
This hints at the org buffer having some special character heights in
it.
> 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?
> 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.
BTW what do (frame-pixel-height) and (frame-height) respectively give in
the two fullscreen versions?
martin
- 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
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/13
- 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, 2014/01/13
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/13
- 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, 2014/01/13
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET),
martin rudalics <=
- 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, 2014/01/14
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/14
- 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, 2014/01/14
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/14
- 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, 2014/01/14
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/15
- 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, 2014/01/17
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/17
- bug#16430: 24.3.50; When fullscreen is triggered from the window manager, I can't resize window (via M-x org-export RET), martin rudalics, 2014/01/18
- 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, 2014/01/19