unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jay McCarthy <jay.mccarthy@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 24579@debbugs.gnu.org
Subject: bug#24579: [PATCH] borderless windows on OS X
Date: Sat, 1 Oct 2016 07:53:39 -0400	[thread overview]
Message-ID: <CAJYbDakTNZ09mQtbozsCLGgH_41QWkUS4erhUDcoJ0Fz6QUjuw@mail.gmail.com> (raw)
In-Reply-To: <57EF777A.9030403@gmx.at>

On Sat, Oct 1, 2016 at 4:44 AM, martin rudalics <rudalics@gmx.at> 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





  reply	other threads:[~2016-10-01 11:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-01  1:31 bug#24579: [PATCH] borderless windows on OS X Jay McCarthy
2016-10-01  8:44 ` martin rudalics
2016-10-01 11:53   ` Jay McCarthy [this message]
2016-10-01 13:41     ` martin rudalics
2016-10-01 20:18       ` Jay McCarthy
2016-10-02  8:29         ` martin rudalics
2016-10-13 17:56           ` Jay McCarthy
2016-10-13 18:36             ` martin rudalics
2016-10-13 22:27               ` Jay McCarthy
2016-10-01 21:26 ` Alan Third
2016-10-01 22:18   ` Jay McCarthy
2016-10-01 23:04     ` Alan Third
2016-10-02  0:49       ` Clément Pit--Claudel
2016-10-02  8:30         ` martin rudalics
2016-10-02 15:07           ` Alan Third
2016-10-02 16:39             ` martin rudalics
2016-10-02 16:49               ` Alan Third
2016-10-02 18:10                 ` martin rudalics
2016-10-02 18:31                   ` Clément Pit--Claudel
2016-10-02 15:18           ` Clément Pit--Claudel
2016-10-02 16:39             ` martin rudalics
2016-10-02 16:50               ` Clément Pit--Claudel
2016-10-02 18:09                 ` martin rudalics
2017-04-21 19:49 ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJYbDakTNZ09mQtbozsCLGgH_41QWkUS4erhUDcoJ0Fz6QUjuw@mail.gmail.com \
    --to=jay.mccarthy@gmail.com \
    --cc=24579@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).