(I am required to use MS Windows at work, so I am trying to figure out
how to get my user environment something like at home, with stumpwm,
conkeror and Emacs. So far I haven't found any Windows replacement
for stumpwm, but I am experimenting with bbLean....)
Any leads for this fullscreen problem would be much appreciated.
"C-h f w32-send-sys-command" will tell you this:
w32-send-sys-command is a built-in function in `C source code'.
(w32-send-sys-command command &optional frame)
Send frame a Windows WM_SYSCOMMAND message of type command.
Some useful values for command are #xf030 to maximize frame (#xf020
to minimize), #xf120 to restore frame to original size, and #xf100
to activate the menubar for keyboard access. #xf140 activates the
screen saver if defined.
If optional parameter frame is not specified, use selected frame.
Is this what you are looking for?
>> Is there a way to send a keystroke to the underlying
>> OS or window manager from Emacs? I am trying to get
>> a true fullscreen (no titlebar) in Emacsw32. f11
>> seems to be getting trapped by Emacs (and conkeror
>> too, by the way).
"C-h f w32-send-sys-command" will tell you this:
[...]
Is this what you are looking for?
Well, that does maximize the frame, but it does not remove
the title bar, as happens in Linux. Looking into this I am
finding that it looks like this is somewhat non-trivial.
There is something that is designed to do that in Windows
called emacs-darkroom-mode[1], but it has about a million
dependencies[2].
In general, though, it would be lovely to be able to make a
really distraction-free environment out of Emacs. The other
thing I would love is a feature such that the
minibuffer/modeline would vanish when not being used for
messages or output, leaving that space for text -- something
like the auto-hide feature that the task-bar has in some
window managers. And, as long as I'm fantasising, I'd like
the Swedish bikini team to parachute in with a six-pack of
beer....
Footnotes:
[1] http://www.martyn.se/code/emacs/darkroom-mode/
[2] Slight exaggeration.
You'll have to wait for Emacs 23, I'm afraid. But there will be 8 beers to a
pack, since it uses UTF8.
I understood that you want to remove the title bar, I just thought
that calling w32-send-sys-command with some value other than those
advertised in the doc string would accomplish what you want.
I am not quite sure, but I do not think it could be done that way. There
are some SC_* keys you can send, like SC_MAXIMIZE. None of these seem to
remove the title bar.
It looks like some C-level code is needed, see
http://www.martyn.se/code/emacs/darkroom-mode/w32toggletitle.py
But why did not Martin record the names of the constant there ...?
> I understood that you want to remove the title bar, I just thought
> that calling w32-send-sys-command with some value other than those
> advertised in the doc string would accomplish what you want.
I'm not aware of any standard feature of Windows that removes the
title bar. The application would have to take care of this itself. The
OP was perhaps confused by the fact that in applications that support
a "full screen" mode, F11 is almost universally the key that toggles
it, so thought that if Emacs merely passed F11 to Windows it would
benefit from the behaviour, but that is not so. If it was the case,
then w32-send-sys-command would almost certainly work.
I'm not aware of any standard feature of Windows that removes the
title bar. The application would have to take care of this itself.
Forgive the persistence---so, when one does F11 on say Internet
Explorer, and most everything, including the title bar goes away, it's
not a system call that I could capitalize on that makes this happen?
Closely related to this question is, is there something that I could put
in my .emacs that would enable the title bar menu? I miss being able to
do `Alt-Space' on the only application---beside IE---that I use when I
boot up in Windows.
If you put the following in .emacs, you will be able to do Alt Space
(two separate key presses - not holding Alt down).
(setq w32-pass-alt-to-system t)
Even without that, you can use F10 Space (or F10 right down if you are
going to be using the arrow keys to navigate anyway).
Thank you for your patience, Jason.
If you put the following in .emacs, you will be able to do Alt Space
(two separate key presses - not holding Alt down).
(setq w32-pass-alt-to-system t)
And thank you for this.
Sorry about that,
the int '-16' is for Style, (i.e, window style). The withTitle value
is the integer-version of 0x00C00000. This all resides in user32.dll.
Does that help? :)
As to constant names, I couldn't help you. I myself dug this up on an
AutoIT-forum somewhere.
... I'm thinking about just releasing a .net-compiled toggletitle.exe
to get rid of the python dependencies. But unfortunately time seems to
be running away from me all the time :)
// Martin