Subject: bug#25408: Remove Decorations Around Emacs Frame (Windows OS)

From: Alan Third <[email-masked]>
Date: Wed, 12 Apr 2017 20:51:21 +0100

On Wed, Apr 12, 2017 at 09:13:15PM +0200, martin rudalics wrote:
> > Should an undecorated frame be resizable? ie. if you run something
> > like
> >
> >      (set-frame-size nil 20 20)
> >
> > would you expect the frame to resize?
> 
> Definitively!  Undecorated frames should behave like normal frames -
> just without decorations.

Excellent, that’s what I wanted to know so I didn’t go chasing after a
behaviour that wasn’t right.

> > Mine currently resizes if the frame was created with decorations and
> > they were removed,
> 
> When can you remove the decorations?  Does it flicker when you do that?

I mean, it *can* resize after I remove the decorations. There’s no
flickering, it’s all quite smooth.

> > but not if it was created without them. I suspect
> > creating it without decorations is breaking some NS → Emacs event
> > path.
> 
> Why do you think so?

The actual macOS window resizes, but the contents of that window
(Emacs) don’t. I’ve attached a screenshot that will hopefully explain
it better.

If I add decorations and remove them again:

    (set-frame-parameter nil 'undecorated nil)
    (set-frame-parameter nil 'undecorated t)

Then I can resize it fine. So it seems like the decorations are adding
something that allows the resize to work.

I’ve tried turning on NSTRACE, but the output looks identical whether
resizing works or not.

I’ll just keep looking at it. Hopefully I’ll be able to track it down.

-- 
Alan Third