unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: martin rudalics <rudalics@gmx.at>
Cc: esabof@gmail.com, 14233@debbugs.gnu.org
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Sun, 21 Apr 2013 19:21:28 +0200	[thread overview]
Message-ID: <9CE9273D-8550-478F-8CB9-0C0D693C0BB8@swipnet.se> (raw)
In-Reply-To: <5173B0D8.4010408@gmx.at>

Hello.

21 apr 2013 kl. 11:26 skrev martin rudalics <rudalics@gmx.at>:

> > WM hints tell the window manager the width increment and height
> > increment that the Emacs frame wants to be resized in.  This means when
> > a user resizes by dragging the window border, the window manager only
> > allows resize increments by the specified width/height increments.
> 
> At least for the window manager of Windos XP this is not true.

That is why testing this on anything but X11 gives the wrong impression on how things work.

> 
> > So
> > there is no half characters showing.  In addition, when resize occurs
> > some, not all, window managers shows the size while resizing.  When
> > width/height increments have been set, the WM shows the size in these
> > units, which for Emacs translates to rows and columns.
> 
> Again with Windows XP resizing an Emacs frame shows the new sizes
> pixelwise.  Only when releasing the mouse button the frame snaps back to
> its previous size unless I made it beyond the character size barrier.
> But in this case it's just Emacs not honoring the WM's request.
> 
> > This does not mean that the toolbar, menubar, scrollbar, fringe etc. has
> > to be in a multiple of these increments.  In addition to the increments,
> > you also specify a base width/height in pixels.  That base width/height
> > is the non-text portions width/height.
> 
> Can you explain what the base width/height is?  Something like a minimum
> size?

Sort of a minimu size if we would have zero columns and lines.

> 
> > So at any time the WM maintains the invariant:
> >    width = base width + n x width increment
> >    height = base height + m x height increment
> >
> > n, m are integers.
> >
> > You can also specify a minimum size, but that is not relevant to this
> > issue.
> 
> A minimum size for what?

A minimum size for the frame.  We do say that the minimum frame is one line and one column, but it could be anthing.  We could say that the minimum size is 5 rows and 14 coulmns, or whatever we choose.  The WM will then not shrink the window below this.

> 
> > Note that for fullscreen, the WM does not keep this invariant, nor does
> > tiling window managers.
> 
> What about maximized frames?

Not for that either.

> 
> > For other types of resize (i.e. interactive
> > with the mouse) I'd like to keep the WM size hints, because it is more
> > userfriendly.
> 
> From the Emacs POV this is easy: I could accept `frame-resize-pixelwise'
> being a list that enumerates all WM operations that should be
> interpreted pixelwise and have t stand for "all are pixelwise" and nil
> for "none are".  The problem is that IIUC a maximize frame request
> should be interpreted pixelwise but comes in just as a plain resize
> request.  What are your experiences in this regard?  How does ns do
> that?
> 

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.

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.

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.

> > If we want to make windows display partial lines that is OK, and even
> > preferrable for the fullscreen/tiling case, but we should not disregard
> > WM size hints for the other case.
> 
> I agree with you.  But we should make them customizable.
> 
> >>> But I'd prefer if the text part is resizable only in terms of
> >>> lines/columns.
> >>
> >> Why?  Is there any other reason beyond WM hints?
> >
> > Usability.  For example, all terminal emulators does this.
> 
> OK.  But this should not impede us from providing an adequate graphical
> implementation.
> 
> >>> An exception to this is tiling window managers and fullscreen behaviour.
> >>
> >> If we cannot resize in pixels, we cannot make those exceptions, can
> >> we?
> >
> > We only need to make Emacs windows be resizable in pixels, not the frame
> > as I tried to explain above.
> 
> Tiling, fullscreen and maximization requests are all incarnations of
> pixelwise resizing of frames.  How else would you call them?

But there is no restriction on NS and X11 frames to resize by pixel (i.e. not character multiples).  We do that already.  The bug reports we get usually concern when we don't adhere to WM size hints, like fullscreen.  Then there are wasted pixels, becaue windows can't resize pixelwise.
That is where the restriction is.

	Jan D.







  reply	other threads:[~2013-04-21 17:21 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19 23:58 bug#14233: 24.3; Don't constrain frame size to character multiples E Sabof
2013-04-20  0:17 ` Glenn Morris
2013-04-20  6:45   ` Eli Zaretskii
2013-04-20  8:53     ` martin rudalics
2013-04-20  9:11       ` Jan Djärv
2013-04-20 11:00         ` martin rudalics
2013-04-20 12:56           ` Jan Djärv
2013-04-20 13:13             ` Eli Zaretskii
2013-04-20 19:26               ` Jan Djärv
2013-04-20 19:54                 ` Eli Zaretskii
2013-04-20 22:02                   ` Drew Adams
2013-04-21  3:40                   ` Stefan Monnier
2013-04-21  7:04                     ` Jan Djärv
2013-04-21  9:28                       ` martin rudalics
2013-04-21 17:05                         ` Jan Djärv
2013-04-22  9:34                           ` martin rudalics
2013-04-22 14:17                       ` Stefan Monnier
2013-04-21  9:27                     ` martin rudalics
2013-04-21  9:27                   ` martin rudalics
2013-04-20 20:47                 ` E Sabof
2013-04-21  9:26                 ` martin rudalics
2013-04-21 17:21                   ` Jan Djärv [this message]
2013-04-22  9:34                     ` martin rudalics
2013-04-22 13:11                       ` Jan Djärv
2013-04-22 15:36                         ` martin rudalics
2013-04-22 16:11                           ` Jan Djärv
2013-04-22 16:38                             ` martin rudalics
2013-04-22 18:21                               ` Eli Zaretskii
2013-04-23  6:52                                 ` martin rudalics
2013-04-23 16:28                                   ` Eli Zaretskii
2013-04-24  6:39                                     ` martin rudalics
2013-04-24 17:13                                       ` Eli Zaretskii
2013-04-23 11:58                               ` Jan Djärv
2013-04-23 12:33                                 ` martin rudalics
2013-04-23 16:48                                   ` Eli Zaretskii
2013-04-24  6:39                                     ` martin rudalics
2013-04-24 16:54                                       ` Jan Djärv
2013-04-25  7:29                                         ` martin rudalics
2013-04-25  9:55                                           ` Jan Djärv
2013-04-25 11:58                                             ` martin rudalics
2013-04-25 15:47                                         ` Richard Stallman
2013-04-24 17:15                                       ` Eli Zaretskii
2013-04-24 17:50                                         ` Jan Djärv
2013-04-25  7:29                                         ` martin rudalics
2013-04-20 13:38             ` martin rudalics
2013-04-20 19:33               ` Jan Djärv
2013-04-20 16:22             ` Drew Adams
2013-04-20 17:12               ` Eli Zaretskii
2013-04-20 21:50                 ` Drew Adams
2013-04-21  9:27                   ` martin rudalics
2013-04-21 16:17                     ` Drew Adams
2013-04-20  9:25       ` Eli Zaretskii
2013-04-20 11:01         ` martin rudalics
2013-04-20 11:32           ` Eli Zaretskii
2013-04-20 13:38             ` martin rudalics
2013-04-20 16:25               ` Eli Zaretskii
2013-04-20 17:35                 ` martin rudalics
2013-04-20 17:48                   ` E Sabof
2013-04-20 18:26                   ` Eli Zaretskii
2013-04-21  9:26                     ` martin rudalics
2013-04-21 15:03                       ` Eli Zaretskii
2013-04-22  9:34                         ` martin rudalics
2013-04-21 17:30                       ` Jan Djärv
2013-04-22  9:34                         ` martin rudalics
2013-04-22 13:12                           ` Jan Djärv
2013-04-22 15:36                             ` martin rudalics
2013-04-22 18:36                               ` Eli Zaretskii
2013-04-23  6:54                                 ` martin rudalics
2013-04-23 16:29                                   ` Eli Zaretskii
2013-04-23  6:50                             ` martin rudalics
2013-04-23 16:23                               ` Eli Zaretskii
2013-04-24  6:38                                 ` martin rudalics
2013-04-24 17:09                                   ` Eli Zaretskii
2013-04-24 18:50                                     ` Stefan Monnier
2013-04-24 20:09                                       ` Jan Djärv
2013-04-25  7:31                                         ` martin rudalics
2013-04-25 10:02                                           ` Jan Djärv
2013-04-25 11:58                                             ` martin rudalics
2013-04-25 14:11                                               ` Jan Djärv
2013-04-25  7:30                                       ` martin rudalics
2013-04-25  7:29                                     ` martin rudalics
2013-04-25 16:24                                       ` Eli Zaretskii
2013-04-26  7:42                                         ` martin rudalics
2013-04-26 13:21                                           ` Stefan Monnier
2013-04-26 14:39                                           ` Drew Adams
2013-04-27  6:59                                             ` martin rudalics
2013-04-27 13:53                                               ` Drew Adams
2013-04-28 12:17                                                 ` martin rudalics
2013-04-28 15:33                                                   ` Drew Adams
2013-04-28 16:29                                                     ` Drew Adams
2013-04-29  7:33                                                     ` martin rudalics
2013-04-29 14:10                                                       ` Drew Adams
2013-04-29 16:48                                                         ` martin rudalics
2013-04-29 20:41                                                           ` Drew Adams
2013-04-30  7:34                                                             ` martin rudalics
2013-04-30 15:47                                                               ` Drew Adams
2013-04-30 17:08                                                                 ` martin rudalics
2013-04-30 19:45                                                                   ` Drew Adams
2013-05-01  9:15                                                                     ` martin rudalics
2013-05-01 13:47                                                                       ` Drew Adams
2013-05-02  9:22                                                                         ` martin rudalics
2013-05-02 13:28                                                                           ` Drew Adams
2014-12-25 19:30 ` martin rudalics

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=9CE9273D-8550-478F-8CB9-0C0D693C0BB8@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=14233@debbugs.gnu.org \
    --cc=esabof@gmail.com \
    --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).