From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: Coordinates and Windows
Date: Wed, 15 Jul 2015 22:34:22 +0300 [thread overview]
Message-ID: <83fv4p6wqp.fsf@gnu.org> (raw)
In-Reply-To: <55A6A4A1.1030307@gmx.at>
> Date: Wed, 15 Jul 2015 20:21:21 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: emacs-devel@gnu.org
>
> > This would mean the tool bar window (it is a real window drawn by
> > Emacs in non-GTK builds) will yield negative frame-relative Y
> > coordinates, won't it?
>
> Yes. And there might be even a menu bar window on top of it.
Is there some configuration where the menu bar is a window?
> > We didn't have such calamity until now, and
> > even if it did work, it would be confusing, I think.
>
> Maybe. But coordinates inside the tool and menu bars are not exposed to
> Lisp (IIUC) so the confusion would be restricted to the display engine
> and the mouse handling routines.
That's not something to dismiss, surely.
> Currently we confuse the user.
My suggestion attempts to remove that confusion, I think.
> > Also, what about the menu bar, in particular on TTY frames? Will the
> > screen estate used for the menu bar also have negative coordinates?
>
> I'm not sure yet. Coordinates on TTY frames are a separate issue,
> functions like `window-pixel-edges' don't make too much sense there.
They still should work, to avoid complications in applications.
> > And don't forget that some modes, like gdb-mi, simulate the tool bar
> > below the menu bar on TTY frames -- what about those?
>
> But if I'm not mistaken neither of these are windows.
No, but their glyph rows still have coordinates.
> > Perhaps we should do it the other way around: make the coordinates in
> > the GTK build be measured from the upper-left corner of the frame,
> > including the tool bar? I think this will be more natural and easy to
> > deal with.
>
> Here the toolbar window doesn't have an integral number of frame lines:
>
> (window-top-line) 3
>
> while
>
> (window-pixel-top) gives 36 (with a character height of 16).
>
> So usually the root window top line must be rounded which I dislike
> profoundly. With a toolbar on the left I would then have to round the
> value of (window-left-column) on GTK as well.
Why do we have to round, now that we have pixel-wise accuracy in
resizing windows and frames?
> And then we would have still the problem that while for most builds we
> do not include the menu bar, we would have to include it when we draw it
> ourselves. So the problem would be only partly solved.
The only cases I know of are the TTY and non-toolkit X. Are there any
others? If not, these are special anyway, and could be handled
separately.
next prev parent reply other threads:[~2015-07-15 19:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 7:00 Coordinates and Windows martin rudalics
2015-07-15 14:57 ` Eli Zaretskii
2015-07-15 18:21 ` martin rudalics
2015-07-15 19:34 ` Eli Zaretskii [this message]
2015-07-16 7:14 ` martin rudalics
2015-07-16 14:32 ` Eli Zaretskii
2015-07-16 18:23 ` martin rudalics
2015-07-17 13:09 ` Eli Zaretskii
2015-07-17 13:36 ` martin rudalics
2015-07-17 14:21 ` Eli Zaretskii
2015-07-17 17:58 ` martin rudalics
2015-07-17 18:10 ` Eli Zaretskii
2015-07-18 9:03 ` martin rudalics
[not found] ` <<83wpxy6f0x.fsf@gnu.org>
2015-07-17 15:09 ` Drew Adams
2015-07-17 17:58 ` martin rudalics
2015-07-17 19:28 ` Drew Adams
2015-07-18 9:03 ` martin rudalics
2015-07-19 16:47 ` Eli Zaretskii
2015-07-20 6:42 ` martin rudalics
2015-07-20 7:04 ` martin rudalics
2015-07-20 16:15 ` Eli Zaretskii
[not found] <<55A60508.7090903@gmx.at>
[not found] <"<83oajd79kz.fsf"@gnu.org>
[not found] ` <"<83fv4p6wqp.fsf"@gnu.org>
[not found] ` <"<83bnfc6um1.fsf"@gnu.org>
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83fv4p6wqp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.