From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#25408: Remove Decorations Around Emacs Frame (Windows OS) Date: Wed, 11 Jan 2017 14:55:27 +0100 Message-ID: <5876394F.8060507@gmx.at> 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: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484142981 22208 195.159.176.226 (11 Jan 2017 13:56:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2017 13:56:21 +0000 (UTC) Cc: 25408@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel To: Arthur Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 11 14:56:16 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 1cRJNs-0004wC-Bz for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 14:56:12 +0100 Original-Received: from localhost ([::1]:54367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRJNw-0007uZ-Gr for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 08:56:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRJNn-0007rv-Et for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 08:56:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRJNi-0001S3-JK for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 08:56:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRJNi-0001Rv-GJ for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 08:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cRJNi-0000lK-5X for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 08:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Jan 2017 13:56: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.14841429502906 (code B ref 25408); Wed, 11 Jan 2017 13:56:02 +0000 Original-Received: (at 25408) by debbugs.gnu.org; 11 Jan 2017 13:55:50 +0000 Original-Received: from localhost ([127.0.0.1]:49484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRJNW-0000kn-0F for submit@debbugs.gnu.org; Wed, 11 Jan 2017 08:55:50 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:52354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRJNT-0000kM-2R for 25408@debbugs.gnu.org; Wed, 11 Jan 2017 08:55:47 -0500 Original-Received: from [192.168.1.100] ([212.95.7.20]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mb8HX-1cBhMe2ea3-00Kj2m; Wed, 11 Jan 2017 14:55:39 +0100 In-Reply-To: X-Provags-ID: V03:K0:/2Z4ldkIkXOmifjps7x3Exoq7gQijHStaZf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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:127997 Archived-At: > (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. "0" is a quite misleading value ;-) See below. But I think I understand what happens. In fact, I haven't told you the whole story: In Fx_create_frame I do additionally tem =3D x_get_arg (dpyinfo, parameters, Qundecorated, NULL, NULL, RES_TYPE_BOOLEAN); FRAME_UNDECORATED (f) =3D !NILP (tem) && !EQ (tem, Qunbound); store_frame_param (f, Qundecorated, FRAME_UNDECORATED (f) ? Qt : Qnil)= ; somewhere _before_ w32_window (f, window_prompting, minibuffer_only) gets called. And in w32_createwindow I have else if (FRAME_UNDECORATED (f)) { f->output_data.w32->dwStyle =3D ~WS_THICKFRAME & ~WS_CAPTION; /* If we want a thin border, specify it here. */ if (NUMBERP (border_width) && (XINT (border_width) > 0)) f->output_data.w32->dwStyle =3D f->output_data.w32->dwStyle | WS_BORDER; } before any other f->output_data.w32->dwStyle assignment and certainly before the FRAME_W32_WINDOW (f) =3D hwnd =3D CreateWindow (EMACS_CLASS, f->namebuf, f->output_data.w32->dwStyle, ... call. Just make sure that any time you set f->output_data.w32->dwStyle you don't overrule a previous assignment. (I haven't sent you a patch because I have completely redesigned the assignments to this component and it probably would distract more than provide any help.) This way (add-to-list 'default-frame-alist '(undecorated . t)) (setq default-frame-alist '((undecorated . t))) (setq initial-frame-alist '((undecorated . t))) should all work. BTW, you can also do f->output_data.w32->dwStyle =3D WS_POPUP; because the only thing Windows forbids in this context is to set WS_POPUP for an existing overlapped window (IIRC). > (defvar decor 0) > (defun toggle-frame-decor () > (interactive) > (progn > (modify-frame-parameters (selected-frame) `((undecorated . ,'decor= ))) You likely mean (modify-frame-parameters (selected-frame) `((undecorated . ,decor))= ) here. And probably you want to do the following calculation > (if (=3D decor 0) > (setq decor 1) > (setq decor 0)))) before calling =E2=80=98modify-frame-parameters=E2=80=99 so the latter wi= ll see the new value. But even this won't work because you want to toggle beween nil and non-nil so (devfar decor nil) and (setq decor (not decor)) are more appropriate. martin