[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unuseful keybindings
From: |
Juri Linkov |
Subject: |
Re: Unuseful keybindings |
Date: |
Mon, 24 Dec 2012 19:10:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
> Actually thinking more in terms of the command line arguments
> `--maximized' and `--fullscreen' suggests a better patch
> that for consistency defines exactly the same corresponding commands
> `toggle-frame-maximized' and `toggle-frame-fullscreen':
It is still too bad that when the frame is maximized, enabling and
disabling fullscreen doesn't restore its maximized state.
The problem is that we have only one frame parameter `fullscreen'
for both frame states `maximized' and `fullscreen'.
So for proper behavior like in other applications we need to remember
the previous `maximized' state and restore it afterwards
like `toggle-frame-fullscreen' does in the following patch:
=== modified file 'lisp/frame.el'
*** lisp/frame.el 2012-12-12 14:43:45 +0000
--- lisp/frame.el 2012-12-24 17:10:45 +0000
*************** (define-minor-mode blink-cursor-mode
*** 1655,1685 ****
;; Frame maximization
- (defcustom frame-maximization-style 'maximized
- "The maximization style of \\[toggle-frame-maximized]."
- :version "24.4"
- :type '(choice
- (const :tab "Respect window manager screen decorations." maximized)
- (const :tab "Ignore window manager screen decorations." fullscreen))
- :group 'frames)
(defun toggle-frame-maximized ()
! "Maximize/un-maximize Emacs frame according to `frame-maximization-style'.
! See also `cycle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
! nil frame-maximization-style)))))
!
! (defun cycle-frame-maximized ()
! "Cycle Emacs frame between normal, maximized, and fullscreen.
See also `toggle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(cl-case (frame-parameter nil 'fullscreen)
! ((nil) 'maximized)
! ((maximized) 'fullscreen)
! ((fullscreen) nil))))))
;;;; Key bindings
--- 1655,1690 ----
;; Frame maximization
(defun toggle-frame-maximized ()
! "Maximize the selected frame or un-maximize if it is already maximized.
! Respect window manager screen decorations.
! See also `toggle-frame-fullscreen'."
(interactive)
(modify-frame-parameters
! nil
! `((fullscreen
! . ,(cond
! ((eq (frame-parameter nil 'fullscreen) 'fullscreen) 'maximized)
! ((frame-parameter nil 'fullscreen) nil)
! (t 'maximized))))))
!
! (defun toggle-frame-fullscreen ()
! "Maximize selected frame to fullscreen or restore if it is fullscreen.
! Ignore window manager screen decorations.
See also `toggle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil
! `((fullscreen
! . ,(if (eq (frame-parameter nil 'fullscreen) 'fullscreen)
! (if (eq (frame-parameter nil 'maximized) 'maximized)
! 'maximized)
! 'fullscreen))
! (maximized
! . ,(if (eq (frame-parameter nil 'fullscreen) 'fullscreen)
! nil
! (frame-parameter nil 'fullscreen))))))
;;;; Key bindings
- RE: Unuseful keybindings, (continued)
- RE: Unuseful keybindings, Drew Adams, 2012/12/22
- Re: Unuseful keybindings, Juri Linkov, 2012/12/23
- Re: Unuseful keybindings, Xue Fuqiao, 2012/12/23
- Re: Unuseful keybindings, Dmitry Gutov, 2012/12/23
- Re: Unuseful keybindings, Xue Fuqiao, 2012/12/23
- RE: Unuseful keybindings, Drew Adams, 2012/12/22
- Re: Unuseful keybindings, Thierry Volpiatto, 2012/12/22
- Re: Unuseful keybindings, Juri Linkov, 2012/12/22
- Re: Unuseful keybindings, Juri Linkov, 2012/12/23
- Re: Unuseful keybindings, Juri Linkov, 2012/12/24
- Re: Unuseful keybindings,
Juri Linkov <=
- Re: Unuseful keybindings, Chong Yidong, 2012/12/29
- RE: Unuseful keybindings, Drew Adams, 2012/12/18
- Re: Unuseful keybindings, Thierry Volpiatto, 2012/12/19
- Re: Unuseful keybindings, Leo, 2012/12/19
Re: Unuseful keybindings, Xue Fuqiao, 2012/12/18
Re: Unuseful keybindings, Eli Zaretskii, 2012/12/18