bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14233: 24.3; Don't constrain frame size to character multiples


From: Jan Djärv
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Mon, 22 Apr 2013 15:11:26 +0200

Hello.

22 apr 2013 kl. 11:34 skrev martin rudalics <rudalics@gmx.at>:

> > For NS a maximized and fullscreen requests comes in as separate
> > requests, for X they are normal resize request.
> [...]
> > The problem is that you think from the W32 point of view where (if I
> > interepret you correctly), Emacs applies size hints after the resize
> > request has been delivered.
> 
> I think so.
> 
> > This is not so for NS and X.  Any size in a resize request is
> > accepted.  If it follows WM size hints, great, if it don't, who
> > cares?.  The frame size is set to the size in the request anyway.
> 
> IIUC we do care because we want to fit the frame's windows according to
> the incoming request.

In the future, yes, but we can't resize windows pixelwise yet.

> 
> > So for NS and X, fullscreen, maximized and such is no problem.  A
> > minor glitch in NS is that we calculate the maximized sizes ourself,
> > and these are rounded to character sizes.  If windows could handle
> > pixel sizes, we could easily fix this.
> 
> In any case, the maximized size of the frame is not necessarily an
> integral multiple of character sizes so the frame gets or should get
> resized pixelwise.

We don't do that now because we can't resize windows pixelwise yet.

> 
> > But there is no restriction on NS and X11 frames to resize by pixel
> > (i.e. not character multiples).
> 
> So by default, on Windows I always accept a maximize request and resize
> windows accordingly.  For any other size request I process a non-rounded
> size iff the variable `frame-resize-pixelwise' is non-nil.
> 
> On all other platforms, `frame-resize-pixelwise' has no impact.  If and
> whether size hints are turned on and have any impact depends on settings
> for the window manager used and is of no concern to me.  Whatever size
> is requested by the WM is processed without any rounding.
> 
> The interface to the window subsystem will be the function
> 
> change_frame_size (struct frame *f, int new_width, int new_height,
>                  bool pretend, bool delay, bool safe, bool pixelwise)
> 
> which processes new_width and new_height in terms of pixels if pixelwise
> is non-nil.
> 

This is insane. it means changing lots and lots of calls, and makes merging 
between branches harder.
Make a new function (change_frame_size_pixelwise for example), with the 
arguments above, and let change_frame_size call it with the last argument false.

        Jan D.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]