bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25408: Remove Decorations Around Emacs Frame (Windows OS)


From: Arthur Miller
Subject: bug#25408: Remove Decorations Around Emacs Frame (Windows OS)
Date: Wed, 11 Jan 2017 11:20:28 +0100

I have a small question: how do I make this take effect in my init file when I run in server/client mode?

Seems like my client always insist on creating frames around emacs window, while when I run
emacs "standalone" (for ex emacs --debug-init) it starts undecorated. I have tried following in my
.emacs:

(add-to-list 'default-frame-alist '(undecorated . 0))
(setq default-frame-alist '((undecorated . 0)))
(setq initial-frame-alist '((undecorated . 0)))

But that does not give any effect at all.

I have following to switch off/on decorations interactively:

(defvar decor 0)
(defun toggle-frame-decor ()
  (interactive)
  (progn
   (modify-frame-parameters (selected-frame) `((undecorated . ,'decor)))
   (if (= decor 0)
       (setq decor 1)
     (setq decor 0))))
(global-set-key [f9] 'toggle-frame-decor)

If I place call to
(toggle-frame-decor)

in .emacs than it works for non-server mode, but not when I run emacsclient
(which I do normally always). I tried to force loading .emacs when severs starts
with -l ~/.emacs switch, but it didn't worked either.

I admit I am just very uneducated about emacs & elisp and would really appreciate if a nice
soul could help with my poor education.

2017-01-11 10:17 GMT+01:00 Arthur Miller <address@hidden>:
I took screenshot of just one version, it was problem with both on/off, at least on my machine.

Just posting wm_size message after the change in your function solves issues in both cases for me.

2017-01-11 9:39 GMT+01:00 martin rudalics <address@hidden>:
> There is a slightly cosmetic issue with above function. When one switches
> back on decorations,
> the frame will not resize properly and minibuffer will be not visible. It's
> there but just
> covered by frame. Just resizing emacs framefixes it.
>
> Adding call to PostMessage(hwnd, WM_SIZE,0,0) in Martins function fixes it.

This is not necessary here.  And it would be strange since the idea is
that the outer frame size remains unchanged.  Hence, any problem would
manifest itself already when you remove the borders by leaving parts of
the display area reserved for the frame not redrawn.

The image you posted in the message you sent just now seems to confirm
that.

But I'm testing this on Windows XP and have not yet pulled the recent
multi-thread Emacs changes.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]