From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#25408: Remove Decorations Around Emacs Frame (Windows OS) Date: Wed, 11 Jan 2017 11:20:28 +0100 Message-ID: References: <587499E6.9030205@gmx.at> <838tqietdj.fsf@gnu.org> <587522DB.2050105@gmx.at> <831swaepnc.fsf@gnu.org> <5875EF34.20507@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c13146c2e7ff10545cef30a X-Trace: blaine.gmane.org 1484130083 24537 195.159.176.226 (11 Jan 2017 10:21:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2017 10:21:23 +0000 (UTC) Cc: 25408@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 11 11:21:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRG1r-0005mN-3w for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 11:21:15 +0100 Original-Received: from localhost ([::1]:53051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRG1v-00089T-IO for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 05:21:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRG1j-00089A-HU for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 05:21:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRG1e-0000vt-Mo for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 05:21:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRG1e-0000vQ-Ie for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 05:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cRG1e-00021x-Ds for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 05:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jan 2017 10:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25408 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25408-submit@debbugs.gnu.org id=B25408.14841300377751 (code B ref 25408); Wed, 11 Jan 2017 10:21:02 +0000 Original-Received: (at 25408) by debbugs.gnu.org; 11 Jan 2017 10:20:37 +0000 Original-Received: from localhost ([127.0.0.1]:49407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRG1E-00020x-JN for submit@debbugs.gnu.org; Wed, 11 Jan 2017 05:20:36 -0500 Original-Received: from mail-wm0-f52.google.com ([74.125.82.52]:38553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRG1C-00020k-Ru for 25408@debbugs.gnu.org; Wed, 11 Jan 2017 05:20:35 -0500 Original-Received: by mail-wm0-f52.google.com with SMTP id r144so23602747wme.1 for <25408@debbugs.gnu.org>; Wed, 11 Jan 2017 02:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DMBSybFWdGR+OcP70BmYTPI23oB5uAEuWJDW/OC7cuM=; b=XJvSGrFXif7DMB6YCu8KcFQo3v5MVj3xvH48ZBoCN/7akZLlVWJviWqTXm/8LyCuZk jPt4lDo6vcMgrK3TELjUeEuyCL+ObNAZ74pROYCkZ59foo/aa0aIA5A5g4gjTC/8KOcX C/98xtPynJ+wJbZV8tJn0IcFOjiBELoGT9QGeo4QhdLSQaSVhluI23zQY+xt+6t/2/QE ciY5cGgMBhZZ6kYZIgnMlDHW6+gaMSkLxdhU0MYwkZZTKrY9kY2nwfisV5+AC+B1T2/9 it7oxc62tV1ymgUXLmuaJ/Z20yNWOycg2KE1GWMT74JXWJgnacj7H4GdrvNPITUIDHJ1 ia6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DMBSybFWdGR+OcP70BmYTPI23oB5uAEuWJDW/OC7cuM=; b=mmo7Wq9chSZlRM7qOyFT6dL1h72urpFNmbwyG0hExKsZrxJ+Cz4uDb0T7nXgcv1qyn 5mgs1W3Oyxc/BHSXDurxZgjBZwC5XRa7vMW982UWdCPTUmaDYZzFD1EYHpelXUwyRXmI ESus0PNrxCTqYg3IuYQbCMaYo3NszMRVOkH1F7uW6DjYvITiHN1qYmkr513j0c0r/d2P bW6sPTUePCYDRAYKXPqJNeOtqDDeShlmMZ09rL7Pc0ti+r3W5yYwkwWbNCx2KX58x0c7 xGLMwHrXUCfFlviKkAPfhQ8WAJpXA0lnpS9TNd7on129Kmpl7iDoyicfDu/nF3NDgllu hmBQ== X-Gm-Message-State: AIkVDXKCvW28K4fzY7rZkqNX6+j+QDpzkn+/+UMum8V+6scu1jzYSdJ+OFGGaftf6oaATFVt3kv6jmTzuvwmfw== X-Received: by 10.28.203.6 with SMTP id b6mr2484241wmg.2.1484130029037; Wed, 11 Jan 2017 02:20:29 -0800 (PST) Original-Received: by 10.194.169.98 with HTTP; Wed, 11 Jan 2017 02:20:28 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127994 Archived-At: --94eb2c13146c2e7ff10545cef30a Content-Type: text/plain; charset=UTF-8 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 : > 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 : > >> > 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 >> > > --94eb2c13146c2e7ff10545cef30a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 w= indow, 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 g= ive any effect at all.

I have following to switch o= ff/on decorations interactively:

(defvar decor 0)
(defun tog= gle-frame-decor ()
=C2=A0 (interactive)
=C2=A0 (progn
=C2=A0=C2=A0= (modify-frame-parameters (selected-frame) `((undecorated . ,'decor)))<= br>=C2=A0=C2=A0 (if (=3D decor 0)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (= setq decor 1)
=C2=A0=C2=A0=C2=A0=C2=A0 (setq decor 0))))
(global-set-= key [f9] 'toggle-frame-decor)

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

in .emacs than it works f= or non-server mode, but not when I run emacsclient
(which I d= o normally always). I tried to force loading .emacs when severs starts
<= /div>
with -l ~/.emacs switch, but it didn't worked either.

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

2017-01-11 10:17 GMT+01:00 Arthur Miller <arthur.miller= .no1@gmail.com>:
I took screenshot of just one version, it was problem with bo= th on/off, at least on my machine.

Just posting wm_size messag= e after the change in your function solves issues in both cases for me.
=
2017-01-11 9:39 GMT+01:00 martin rudalics <ruda= lics@gmx.at>:
> Th= ere 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 fixe= s it.

This is not necessary here.=C2=A0 And it would be strange since the idea is=
that the outer frame size remains unchanged.=C2=A0 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


--94eb2c13146c2e7ff10545cef30a--