From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jay McCarthy Newsgroups: gmane.emacs.bugs Subject: bug#24579: [PATCH] borderless windows on OS X Date: Fri, 30 Sep 2016 21:31:09 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a1148cc3a6eb717053dc3aa78 X-Trace: blaine.gmane.org 1475298572 27860 195.159.176.226 (1 Oct 2016 05:09:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2016 05:09:32 +0000 (UTC) To: 24579@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 07:09:28 2016 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 1bqCY2-0005Ok-5c for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 07:09:18 +0200 Original-Received: from localhost ([::1]:48295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqCY0-0000bq-9W for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 01:09:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqCXp-0000aE-5E for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 01:09:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqCXn-00073u-6C for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 01:09:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqCXn-00073l-2M for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 01:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bqCXm-0003rW-JR for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 01:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jay McCarthy Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2016 05:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24579 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147529849814774 (code B ref -1); Sat, 01 Oct 2016 05:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Oct 2016 05:08:18 +0000 Original-Received: from localhost ([127.0.0.1]:40146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqCX4-0003qC-0X for submit@debbugs.gnu.org; Sat, 01 Oct 2016 01:08:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bq998-00070u-Lw for submit@debbugs.gnu.org; Fri, 30 Sep 2016 21:31:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq992-0002fr-Cp for submit@debbugs.gnu.org; Fri, 30 Sep 2016 21:31:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq992-0002e3-9T for submit@debbugs.gnu.org; Fri, 30 Sep 2016 21:31:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq98z-0008QG-Qg for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2016 21:31:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq98x-0002dD-Qm for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2016 21:31:12 -0400 Original-Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:32783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq98x-0002cv-Ky for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2016 21:31:11 -0400 Original-Received: by mail-io0-x22e.google.com with SMTP id r145so76077173ior.0 for ; Fri, 30 Sep 2016 18:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=7PnFHpyXlDWcCeKLhdL80qjSfvPJKTHA4MzpivEtXI8=; b=R8vFkm5o0rYoZMewLq0B5AF+Wdfyyp9K7fIydkBqqvFgaF7yB1Ps/wtbUd61Mws129 h57a3HILwi2xnQI0FBCooiHJgfdyh3lnnIBoIQyd2U/L8Zw30huBtqNibwyXLLn8pBCX KH9yYqwh9haka9Ceh6O66y1U5Nj0M8DqcrBbOdLKBxNOIhUt0fBzoIbfOmjhKCPiw5/g ZOFYjqOC42x0cdFG0zg+UrtIGlIrqSmTxHArAW1GMfDcvx1pdbhVWQ1VIzdUQHGdTBEU FwMWjc5vqY8fZfu6msnQErnQUAc0C3CZyM03kjrTpyVnnxIVf25ux6vdKRMR0jpRlWt8 g8mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7PnFHpyXlDWcCeKLhdL80qjSfvPJKTHA4MzpivEtXI8=; b=OJCYSsAI08ypaM7iwGOGB38freNA9kHGGfZzhbsnHqlbt3YQOnaL8IKHprtvZefNvu SQCPkKj9HJGztXsNrlj0bv+t0ENK1GXTJqLWXhsih1aUl3TavQqBT7+ZAte5UmBKTprl zXelV3CIw2CskhQiHydtq0shBkc5UtJv/8/MaO/jFaGydoGAiXHYVA9L+LUZWccTVhmB 0j2WLUyUcaSikou0KaPGheR/z3aviU0PfzueMIWyCZrVHwCgm4vMpxt1HAq654fr/IID c09S7TllVKarzvR5GXm6JN1mL5cHQiBfoPFp13YfZmX8txY2Vpdw2v0tKSkpNpmzmsWL 9ewA== X-Gm-Message-State: AA6/9RmlgChFLCWwhdkz2AgphiIX93z+2+9l5Ecz9Pb+mDTMreZgrvgXIVXSRp8CwkqchimHOxwoGCNOo2BlTQ== X-Received: by 10.107.146.4 with SMTP id u4mr11694325iod.34.1475285470746; Fri, 30 Sep 2016 18:31:10 -0700 (PDT) Original-Received: by 10.64.35.231 with HTTP; Fri, 30 Sep 2016 18:31:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 01 Oct 2016 01:08:16 -0400 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:123810 Archived-At: --001a1148cc3a6eb717053dc3aa78 Content-Type: text/plain; charset=UTF-8 There are two popular Emacs patches for OS X that make all its windows have no title bar: https://github.com/nikhilunni/BorderlessEmacs https://github.com/gwydirsam/emacs-mac-borderless This patch integrates these by providing a variable (ns-use-titled-windows) that allows this decision to be controlled at runtime. The default is to use titles, like normal. -- Some comments on the patch This is my first Emacs patch. I hope it's okay. The only difference between EmacsFSWindow and EmacsWindow is explicitly telling OS X that the window can be the subject of focus, which is required for borderless windows. (EmacsFSWindow has nothing to do with being fullscreen.) A toolbar can't be used without a title bar. If this isn't included, then the console prints an error, but nothing bad happens. I think it is a bit ugly to `if` out this, but not as ugly as an expected error message. I included a note in the Changelog, because it looks like all variables like this get put in, but it could be removed from my perspective... I have no need to satisfy my pride with my name in the log. However, I didn't add anything to NEWS, because it seems to not always mention things like this. --001a1148cc3a6eb717053dc3aa78 Content-Type: application/octet-stream; name="ns-use-titled-windows.patch" Content-Disposition: attachment; filename="ns-use-titled-windows.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_itqiov000 ZGlmZiAtLWdpdCBhL0NoYW5nZUxvZy4yIGIvQ2hhbmdlTG9nLjIKaW5kZXggM2YzZDU1OC4uYjBi ZmRjNiAxMDA2NDQKLS0tIGEvQ2hhbmdlTG9nLjIKKysrIGIvQ2hhbmdlTG9nLjIKQEAgLTEsMyAr MSw3IEBACisyMDE2LTA5LTMwICBKYXkgTWNDYXJ0aHkgIDxqYXkubWNjYXJ0aHlAZ21haWwuY29t KQorCisJKiBjdXMtc3RhcnQuZWwgKGFsbCk6IEFkZCBucy11c2UtdGl0bGVkLXdpbmRvd3MKKwog MjAxNi0wOS0yNiAgTmljb2xhcyBQZXR0b24gIDxuaWNvbGFzQHBldHRvbi5mcj4KIAogCSogVmVy c2lvbiAyNS4xIHJlbGVhc2VkLgpkaWZmIC0tZ2l0IGEvbGlzcC9jdXMtc3RhcnQuZWwgYi9saXNw L2N1cy1zdGFydC5lbAppbmRleCBkOWFkMGE1Li45ZTUyZDBmIDEwMDY0NAotLS0gYS9saXNwL2N1 cy1zdGFydC5lbAorKysgYi9saXNwL2N1cy1zdGFydC5lbApAQCAtNDQ2LDYgKzQ0Niw3IEBAIG1p bmlidWZmZXItcHJvbXB0LXByb3BlcnRpZXMtLXNldHRlcgogCSAgICAgKG5zLXVzZS1uYXRpdmUt ZnVsbHNjcmVlbiBucyBib29sZWFuICIyNC40IikKICAgICAgICAgICAgICAobnMtdXNlLWZ1bGxz Y3JlZW4tYW5pbWF0aW9uIG5zIGJvb2xlYW4gIjI1LjEiKQogICAgICAgICAgICAgIChucy11c2Ut c3JnYi1jb2xvcnNwYWNlIG5zIGJvb2xlYW4gIjI0LjQiKQorICAgICAgICAgICAgIChucy11c2Ut dGl0bGVkLXdpbmRvd3MgbnMgYm9vbGVhbiAiMjUuMiIpCiAJICAgICA7OyBwcm9jZXNzLmMKIAkg ICAgIChkZWxldGUtZXhpdGVkLXByb2Nlc3NlcyBwcm9jZXNzZXMtYmFzaWNzIGJvb2xlYW4pCiAJ ICAgICA7OyBzeW50YXguYwpkaWZmIC0tZ2l0IGEvc3JjL25zdGVybS5tIGIvc3JjL25zdGVybS5t CmluZGV4IDFiNDRhNzMuLmQwMTMxMDEgMTAwNjQ0Ci0tLSBhL3NyYy9uc3Rlcm0ubQorKysgYi9z cmMvbnN0ZXJtLm0KQEAgLTY3NzUsMTEgKzY3NzUsMTMgQEAgLSAoQk9PTClpc09wYXF1ZQogICBt YXhpbWl6aW5nX3Jlc2l6ZSA9IE5POwogI2VuZGlmCiAKLSAgd2luID0gW1tFbWFjc1dpbmRvdyBh bGxvY10KKyAgd2luID0gW1tFbWFjc0ZTV2luZG93IGFsbG9jXQogICAgICAgICAgICAgaW5pdFdp dGhDb250ZW50UmVjdDogcgogICAgICAgICAgICAgICAgICAgICAgIHN0eWxlTWFzazogKE5TV2lu ZG93U3R5bGVNYXNrUmVzaXphYmxlIHwKICNpZiBNQUNfT1NfWF9WRVJTSU9OX01BWF9BTExPV0VE ID49IE1BQ19PU19YX1ZFUlNJT05fMTBfNwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIE5TV2luZG93U3R5bGVNYXNrVGl0bGVkIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAobnNfdXNlX3RpdGxlZF93aW5kb3dzID8KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgTlNXaW5kb3dTdHlsZU1hc2tUaXRsZWQgOgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBOU1dpbmRvd1N0eWxlTWFza0JvcmRlcmxlc3MpIHwKICNlbmRpZgog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5TV2luZG93U3R5bGVNYXNrTWluaWF0 dXJpemFibGUgfAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5TV2luZG93U3R5 bGVNYXNrQ2xvc2FibGUpCkBAIC02ODEyLDYgKzY4MTQsNyBAQCAtIChCT09MKWlzT3BhcXVlCiAg IFt3aW4gc2V0VGl0bGU6IG5hbWVdOwogCiAgIC8qIHRvb2xiYXIgc3VwcG9ydCAqLworICBpZiAo IG5zX3VzZV90aXRsZWRfd2luZG93cyApIHsKICAgdG9vbGJhciA9IFtbRW1hY3NUb29sYmFyIGFs bG9jXSBpbml0Rm9yVmlldzogc2VsZiB3aXRoSWRlbnRpZmllcjoKICAgICAgICAgICAgICAgICAg ICAgICAgICBbTlNTdHJpbmcgc3RyaW5nV2l0aEZvcm1hdDogQCJFbWFjcyBGcmFtZSAlZCIsCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5zX3dpbmRvd19udW1dXTsKQEAgLTY4 MzMsNiArNjgzNiw3IEBAIFRoaXMgYXZvaWRzIGFuIGV4dHJhIGNsZWFyIGFuZCByZWRyYXcgKGZs aWNrZXIpIGF0IGZyYW1lIGNyZWF0aW9uLiAgKi8KICAgfQogI2VuZGlmCiAgIEZSQU1FX1RPT0xC QVJfSEVJR0hUIChmKSA9IDA7CisgIH0KIAogICB0ZW0gPSBmLT5pY29uX25hbWU7CiAgIGlmICgh TklMUCAodGVtKSkKQEAgLTg3NTksNiArODc2MywxMiBAQCBOaWwgbWVhbnMgdXNlIGZ1bGxzY3Jl ZW4gdGhlIG9sZCAoPCAxMC43KSB3YXkuICBUaGUgb2xkIHdheSB3b3JrcyBiZXR0ZXIgd2l0aAog VGhpcyB2YXJpYWJsZSBpcyBpZ25vcmVkIG9uIE9TWCA8IDEwLjcgYW5kIEdOVXN0ZXAuICAqLyk7 CiAgIG5zX3VzZV9zcmdiX2NvbG9yc3BhY2UgPSBZRVM7CiAKKyAgREVGVkFSX0JPT0wgKCJucy11 c2UtdGl0bGVkLXdpbmRvd3MiLCBuc191c2VfdGl0bGVkX3dpbmRvd3MsCisgICAgIGRvYzogLypO b24tbmlsIG1lYW5zIHRvIGluY2x1ZGUgYSB0aXRsZSBvbiB3aW5kb3dzLiAgTmlsIG1lYW5zIHRv CitvbWl0IHRoZSB0aXRsZSBvbiBPU1ggPj0gMTAuNy4gIFRoaXMgdmFyaWFibGUgaXMgaWdub3Jl ZCBvbiBPU1ggPAorMTAuNy4gIERlZmF1bHQgaXMgdC4gICovKTsKKyAgbnNfdXNlX3RpdGxlZF93 aW5kb3dzID0gWUVTOworCiAgIC8qIFRPRE86IG1vdmUgdG8gY29tbW9uIGNvZGUgKi8KICAgREVG VkFSX0xJU1AgKCJ4LXRvb2xraXQtc2Nyb2xsLWJhcnMiLCBWeF90b29sa2l0X3Njcm9sbF9iYXJz LAogCSAgICAgICBkb2M6IC8qIFdoaWNoIHRvb2xraXQgc2Nyb2xsIGJhcnMgRW1hY3MgdXNlcywg aWYgYW55Lgo= --001a1148cc3a6eb717053dc3aa78--