From: "rgb" <rbielaws@i1.net>
Subject: Re: Toggle fullscreen with one key
Date: 18 Mar 2005 16:30:32 -0800 [thread overview]
Message-ID: <1111192232.441586.253180@f14g2000cwb.googlegroups.com> (raw)
In-Reply-To: MPG.1ca43861f435e0c5989681@news1.comhem.se
This seems to work pretty well for me.
If you use the restore/maximize buttons or double click the
title bar (etc) my-frame-state could get out of sync but it
re-syncs every time my-frame-maximize or my-frame-restore
are called.
(make-variable-frame-local 'my-frame-state)
>
> (defun my-frame-maximize () "Maximize Emacs window in win32"
> (interactive)
(modify-frame-parameters nil '((my-frame-state . t)))
> (w32-send-sys-command ?\xf030))
>
> (defun my-frame-restore () "Restore Emacs window in win32"
> (interactive)
(modify-frame-parameters nil '((my-frame-state . nil)))
> (w32-send-sys-command ?\xF120))
>
(defun my-frame-toggle ()
"Maximize/Restore Emacs frame based on `my-frame-state'"
(interactive)
(if my-frame-state
(my-frame-restore)
(my-frame-maximize)))
> --- keys
>
(global-set-key [f2] 'my-frame-toggle)
>
prev parent reply other threads:[~2005-03-19 0:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-17 23:56 Toggle fullscreen with one key Johan Josefsson
2005-03-18 0:57 ` Drew Adams
2005-03-18 1:08 ` Pascal Bourguignon
2005-03-18 12:11 ` Mathias Dahl
2005-03-19 0:30 ` rgb [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1111192232.441586.253180@f14g2000cwb.googlegroups.com \
--to=rbielaws@i1.net \
/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.
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).