all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Coordinates and Windows
Date: Sat, 18 Jul 2015 11:03:29 +0200	[thread overview]
Message-ID: <55AA1661.1090106@gmx.at> (raw)
In-Reply-To: <83twt264g0.fsf@gnu.org>

 >> For example, on Windows I need accurate dimensions of decorations to
 >> emulate fullheight and fullwidth fullscreen modes.
 >
 > What do you mean by "emulate"?  AFAIK, these are supported on Windows
 > without any need for emulation.

The Windows API knows only minimized and maximized frames.  The
fullboth, fullheight and fullwidth ones must be emulated.  I read that
Aero Snap provides a similar service but to my knowledge we can't call
that from within Emacs.  Also there was a bug report (by Juanma IIRC)
that we don't support some Snap feature(s) yet.

Just to explain what emulation means in this context: When a user sets
the `fullscreen' parameter to `maximized' we send a maximize request to
the OS, the latter calculates the coordinates and calls us back with the
new coordiantes.  When a user sets the `fullscreen' parameter to
`fullheight', Emacs calculates the new coordinates and sends a resize
request to the OS.  The OS has no idea that our frame is "full height".

 > Why do you need _frame_ relative coordinates to display something at
 > _window_ relative position?

Because currently `window-absolute-pixel-edges' is not accurate.  I use
a three steps translation process:

(1) `pos-visible-in-window-p' gets me "pixel coordinates relative to the
     top left corner of the window".

(2) I add the offsets of the window within its frame.

(3) I add the offsets of the frame on the display.

But the frame offsets I get via the `left' and `top' frame parameters in
(3) are those of the "outer frame" as placed by the window manager.
Hence in (2) the offsets provided, for example, by `window-pixel-edges'
as "relative to 0, 0 at the top left corner of the frame" are
insufficient because that corner is not the one from (3).

 >> No.  The root window is beneath the tool bar window separated from the
 >> latter by the internal border.
 >
 > Strange.

In a session where you never split windows, the root window is always
the one you see and work in.  Also, the minibuffer window, if it exists,
is beneath the root window unless your frame is a "minibuffer-only" one.

martin



  reply	other threads:[~2015-07-18  9:03 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
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 [this message]
     [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] <"<83oajd79kz.fsf"@gnu.org>
     [not found] ` <"<83fv4p6wqp.fsf"@gnu.org>
     [not found]   ` <"<83bnfc6um1.fsf"@gnu.org>
     [not found] <<55A60508.7090903@gmx.at>

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=55AA1661.1090106@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.