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: Sat, 1 Oct 2016 07:53:39 -0400 Message-ID: References: <57EF777A.9030403@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1475337210 16506 195.159.176.226 (1 Oct 2016 15:53:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2016 15:53:30 +0000 (UTC) Cc: 24579@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 17:53:25 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 1bqMbD-0002hC-VC for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 17:53:16 +0200 Original-Received: from localhost ([::1]:56232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqMbC-0001I7-I4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2016 11:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqMb4-0001Hr-LM for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 11:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqMb0-0007oW-GM for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 11:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqMb0-0007oS-CQ for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 11:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bqMb0-0006RG-Ci for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2016 11:53: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 15:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24579 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24579-submit@debbugs.gnu.org id=B24579.147533716824716 (code B ref 24579); Sat, 01 Oct 2016 15:53:02 +0000 Original-Received: (at 24579) by debbugs.gnu.org; 1 Oct 2016 15:52:48 +0000 Original-Received: from localhost ([127.0.0.1]:41277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqMam-0006Qa-7B for submit@debbugs.gnu.org; Sat, 01 Oct 2016 11:52:48 -0400 Original-Received: from mail-it0-f42.google.com ([209.85.214.42]:37452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqIrS-0000Nw-Ci for 24579@debbugs.gnu.org; Sat, 01 Oct 2016 07:53:47 -0400 Original-Received: by mail-it0-f42.google.com with SMTP id j69so80920567itb.0 for <24579@debbugs.gnu.org>; Sat, 01 Oct 2016 04:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+Opu9N+wCSy2iGKRxucL17ich80QTtdPNHJ+t5Hbvog=; b=JFUQtmN0A6ODrRfOz16q1+q3EaX+TCksoQRBFf6Zb8QKlknxty+rbFdZSgl2FTCGo+ Ut5slUmonxGcLR+cavgVODC7mNlKE8nqgAfP60KdbB16SWlwm3ljsQC+tPj52mGFD3tw +ADYv4wl+p6r8txd1p7yIX7R8nkNK4cYD8TqF+/+Wy2QEzHdyAtPZs0mhjVPv0gUym7D Q0XbmjV0wY3bxgdfjOh30o4m0r8t2bmG3CsQynYDNnXpBA0FqYBOi5HAezXysX2XyCHa VQ3RrtPL58qmMJKwhDmD75GmLMmZRt/HiysIn9l8SCMu3tiiW5rmqSQ6DAPUlbDRJe2K Y59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+Opu9N+wCSy2iGKRxucL17ich80QTtdPNHJ+t5Hbvog=; b=lBrVchdXCRqjARt1Dc2WUQBMIqz/wm79poWFKrIJ7uf5zyvab6llqhOSCjg/3yihti /pi8gSFc3aKD1PDL/gWTPpfiWA7XCfRbvrM+7iukDE8TUcJl8JAf2P6KUFee17wV2LFH Fww3dWTjrETNQmprS4XH3N3zJfRItuuw9u2SCXPm+1XQzA/uDZV7sDcPetpzy9NjHWbX skVAQk2UJe2GPWNFwnUPJyoElvmYnR+w/JeOiwVeFbEyY8Q5e0HNiJJe2XviwdeefPQX 8x7Rk6ogC+g0rinwUj38buYXtUdjjsQuAg1xyCee8uznPKSeLLF+PD6xCZsyoR2TS9yP szvQ== X-Gm-Message-State: AA6/9RnAGnGSQcm1sBif4XIZKUMlXdhKO0MQSRkTid/R+WuZqIVRzoEYgQdzfiwwZsDvo5CFpDqx+xgZnN5PTA== X-Received: by 10.36.152.5 with SMTP id n5mr8952551itd.79.1475322820584; Sat, 01 Oct 2016 04:53:40 -0700 (PDT) Original-Received: by 10.64.35.231 with HTTP; Sat, 1 Oct 2016 04:53:39 -0700 (PDT) In-Reply-To: <57EF777A.9030403@gmx.at> X-Mailman-Approved-At: Sat, 01 Oct 2016 11:52:46 -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:123856 Archived-At: On Sat, Oct 1, 2016 at 4:44 AM, martin rudalics wrote: >> 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. > > Thank you. I have a couple of questions: > > (1) Is there a way to mix behaviors in one and the same session - that > is have at the same time a window with a title bar and one without? > It's possible under X and Windows as can be seen with tooltip frames. Yes, because as implemented the variable only affects new frames, so you can switch it on and off as you create frames to get both styles. Thus, it could be a frame parameter as well. I didn't do it this way because I personally want it to be a global setting and because I didn't see the existing window creation code looking at the frame parameter alist and I didn't look around the file much to get a bigger picture of how it works. > (2) Is there an option to draw borders and, if so, borders of different > width on a borderless frame? Latter are available via X but not on > Windows. Yes, I believe that the setContentBorderThickness:forEdge: function on the win object would let you do that, but I haven't test that. I know that iTerm2's title-less option gives the ability to add a border, but I worry it is implement with a custom renderer. https://developer.apple.com/reference/appkit/nswindow/1419541-setcontentborderthickness?language=objc > (3) IIUC setting your option does not toggle titles/borders on existing > frames. Would it be possible to do so? We could do that on Windows but > it seems impossible with GNU/Linux window managers. It is possible to do that with [win setStyleMask: NSBorderlessWindowMask], so it would be conceivable to add some functions that would flip that setting on real frames. Although, I don't see a way to go from an Emacs frame structure to the window object. So, this seems like it would be a big patch (because you'd want to do it in as cross-platform a way as possible) and different than this one, so I hope the current patch is judged independently. > Thanks again, martin FWIW, I am not an OS X developer, so I don't know all the ins-and-outs of this. My preference would be for this patch to go in if someone isn't going to immediately do the frame parameter thing, because I don't have the bandwidth to do it, I don't think. Jay -- Jay McCarthy Associate Professor PLT @ CS @ UMass Lowell http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33