From: martin rudalics <rudalics@gmx.at>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>,
"Chris Feng" <chris.w.feng@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?)
Date: Wed, 17 Feb 2016 10:13:17 +0100 [thread overview]
Message-ID: <56C439AD.9040002@gmx.at> (raw)
In-Reply-To: <56C3B4CD.5020404@gmail.com>
> * add a frame parameter to frame_parms in frame.c, say "chromeless"
I'd prefer "decorated" as in gtk_window_set-decorated.
> * add an x_set_chromeless slot in each of frame_parm_handler x_frame_parm_handlers[], frame_parm_handler w32_frame_parm_handlers[], frame_parm_handler ns_frame_parm_handlers[]; for the last two point to 0 for now; for the first one point to a new function x_set_chromeless.
> * In x-create-frame, add something like
> x_default_parameter (f, parms, Qchromeless, Qnil,
> "chromeless", "Chromeless", RES_TYPE_BOOLEAN);
For X I doubt that it's always possible to add/remove the decorations of
an existing frame. For Windows the below works here with
x_default_parameter (f, parameters, Qdecorated, Qnil,
"decorated", "Decorated", RES_TYPE_SYMBOL);
martin
void
x_set_decorated (struct frame *f, Lisp_Object decorated, Lisp_Object old_decorated)
{
HWND hwnd = FRAME_W32_WINDOW (f);
DWORD dwStyle = GetWindowLong (hwnd, GWL_STYLE);
block_input ();
if (EQ (decorated, Qnone))
/* Remove caption and border. */
SetWindowLong (hwnd, GWL_STYLE, dwStyle & ~WS_CAPTION & ~WS_THICKFRAME);
else if (EQ (decorated, Qtip_frame))
/* Retain 1-pixel wide border. */
SetWindowLong (hwnd, GWL_STYLE, (dwStyle & ~WS_CAPTION & ~WS_THICKFRAME) | WS_POPUPWINDOW);
else
/* Restore decoration. */
SetWindowLong (hwnd, GWL_STYLE, dwStyle | WS_CAPTION | WS_THICKFRAME);
/* Preserve outer position and size as well as Z-order. */
SetWindowPos (hwnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE
| SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
unblock_input ();
}
next prev parent reply other threads:[~2016-02-17 9:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 15:01 Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp? Clément Pit--Claudel
2016-02-13 2:15 ` Chris Feng
2016-02-13 3:35 ` Clément Pit--Claudel
2016-02-13 3:57 ` Chris Feng
2016-02-16 20:12 ` Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?) Clément Pit--Claudel
2016-02-16 22:41 ` Chris Feng
2016-02-16 22:55 ` Clément Pit--Claudel
2016-02-16 23:14 ` Chris Feng
2016-02-16 23:46 ` Clément Pit--Claudel
2016-02-17 9:13 ` martin rudalics [this message]
2016-02-17 13:49 ` Chris Feng
2016-02-17 14:55 ` Clément Pit--Claudel
2016-02-18 1:28 ` Chris Feng
2016-02-17 14:57 ` Clément Pit--Claudel
2016-02-18 10:51 ` martin rudalics
2016-02-14 14:05 ` Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp? Stefan Monnier
2016-02-14 16:44 ` Eli Zaretskii
2016-02-14 17:19 ` Stefan Monnier
2016-02-14 18:00 ` Eli Zaretskii
2016-02-16 20:06 ` Clément Pit--Claudel
2016-02-15 10:57 ` martin rudalics
2016-02-15 13:31 ` Stefan Monnier
2016-02-16 20:06 ` Clément Pit--Claudel
2016-02-16 20:05 ` Clément Pit--Claudel
2016-02-16 21:33 ` Johan Bockgård
2016-02-16 22:18 ` Clément Pit--Claudel
2016-02-17 9:12 ` martin rudalics
2016-02-17 14:26 ` Clément Pit--Claudel
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C439AD.9040002@gmx.at \
--to=rudalics@gmx.at \
--cc=chris.w.feng@gmail.com \
--cc=clement.pit@gmail.com \
--cc=emacs-devel@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.