unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* toggle-frame-maximized
@ 2012-12-11 20:38 Sam Steingold
  2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
  2012-12-12  6:49 ` toggle-frame-maximized Jan Djärv
  0 siblings, 2 replies; 5+ messages in thread
From: Sam Steingold @ 2012-12-11 20:38 UTC (permalink / raw)
  To: emacs-devel

A de-facto standard keybinding is f11: maximize/full screen the window.
(chrome, gnome-terminal, freeciv - all comply).

Here is an implementation for emacs:

--8<---------------cut here---------------start------------->8---
(defcustom frame-maximization-mode '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-mode'."
  (interactive)
  (modify-frame-parameters
   nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
                            nil frame-maximization-mode)))))

(define-key global-map [f11] 'toggle-frame-maximized)
--8<---------------cut here---------------end--------------->8---

I think this should go into frame.el.
Objections?

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://honestreporting.com http://jihadwatch.org
http://americancensorship.org http://dhimmi.com http://iris.org.il
A professor is someone who talks in someone else's sleep.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: toggle-frame-maximized
  2012-12-11 20:38 toggle-frame-maximized Sam Steingold
@ 2012-12-11 22:28 ` Xue Fuqiao
  2012-12-11 22:38   ` toggle-frame-maximized Sam Steingold
  2012-12-12  6:49 ` toggle-frame-maximized Jan Djärv
  1 sibling, 1 reply; 5+ messages in thread
From: Xue Fuqiao @ 2012-12-11 22:28 UTC (permalink / raw)
  To: sds; +Cc: emacs-devel

On Tue, 11 Dec 2012 15:38:10 -0500
Sam Steingold <sds@gnu.org> wrote:

> A de-facto standard keybinding is f11: maximize/full screen the window.
> (chrome, gnome-terminal, freeciv - all comply).

But for many terminals (notably DEC terminals) <F11> generates <ESC>.

And Drew's library frame-cmds.el(http://www.emacswiki.org/emacs/frame-cmds.el) provides various commands to maximize frames(although `maximized' is not the same as `fullscreen').

fullscreen.el(http://www.emacswiki.org/emacs/fullscreen.el) also provides fullscreen support.

-- 
Best regards, Fuqiao.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: toggle-frame-maximized
  2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
@ 2012-12-11 22:38   ` Sam Steingold
  2012-12-11 23:01     ` toggle-frame-maximized Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Steingold @ 2012-12-11 22:38 UTC (permalink / raw)
  To: emacs-devel

> * Xue Fuqiao <ksd.serr@tznvy.pbz> [2012-12-12 06:28:16 +0800]:
>
> On Tue, 11 Dec 2012 15:38:10 -0500
> Sam Steingold <sds@gnu.org> wrote:
>
>> A de-facto standard keybinding is f11: maximize/full screen the window.
>> (chrome, gnome-terminal, freeciv - all comply).
>
> But for many terminals (notably DEC terminals) <F11> generates <ESC>.

This is not a very common use case, and f11 is not relevant to such a
case anyway.

> And Drew's library frame-cmds.el
> (http://www.emacswiki.org/emacs/frame-cmds.el) provides various
> commands to maximize frames(although `maximized' is not the same as
> `fullscreen').

This offers a lot of useful functionality,
and one might argue for its inclusion into Emacs,
but it is, essentially, optional/non-standard.

My code makes Emacs a more compliant desktop application.

> fullscreen.el(http://www.emacswiki.org/emacs/fullscreen.el) also
> provides fullscreen support.

This is old and very X-specific.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://ffii.org http://jihadwatch.org http://pmw.org.il
http://dhimmi.com http://thereligionofpeace.com http://palestinefacts.org
Are you smart enough to use Lisp?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: toggle-frame-maximized
  2012-12-11 22:38   ` toggle-frame-maximized Sam Steingold
@ 2012-12-11 23:01     ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2012-12-11 23:01 UTC (permalink / raw)
  To: sds, emacs-devel

> > And Drew's library frame-cmds.el
> > (http://www.emacswiki.org/emacs/frame-cmds.el) provides various
> > commands to maximize frames(although `maximized' is not the same as
> > `fullscreen').
> 
> This offers a lot of useful functionality,
> and one might argue for its inclusion into Emacs,
> but it is, essentially, optional/non-standard.

FWIW/la-petite-histoire: I've offered it, all or any part.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: toggle-frame-maximized
  2012-12-11 20:38 toggle-frame-maximized Sam Steingold
  2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
@ 2012-12-12  6:49 ` Jan Djärv
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Djärv @ 2012-12-12  6:49 UTC (permalink / raw)
  To: sds; +Cc: emacs-devel

Hello.

11 dec 2012 kl. 21:38 skrev Sam Steingold <sds@gnu.org>:

> A de-facto standard keybinding is f11: maximize/full screen the window.
> (chrome, gnome-terminal, freeciv - all comply).
> 
> Here is an implementation for emacs:
> 
> --8<---------------cut here---------------start------------->8---
> (defcustom frame-maximization-mode '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-mode'."
>  (interactive)
>  (modify-frame-parameters
>   nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
>                            nil frame-maximization-mode)))))
> 
> (define-key global-map [f11] 'toggle-frame-maximized)
> --8<---------------cut here---------------end--------------->8---
> 
> I think this should go into frame.el.
> Objections?

It is a good idea overall.  But I would like to suggest Shift-f11 or Ctrl-f11 or something to do the complement of frame-maximization-mode.  

I tend to use both, and having both available would be convinient.

Thanks,

	Jan D.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-12  6:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 20:38 toggle-frame-maximized Sam Steingold
2012-12-11 22:28 ` toggle-frame-maximized Xue Fuqiao
2012-12-11 22:38   ` toggle-frame-maximized Sam Steingold
2012-12-11 23:01     ` toggle-frame-maximized Drew Adams
2012-12-12  6:49 ` toggle-frame-maximized Jan Djärv

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).