all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: martin rudalics <rudalics@gmx.at>
Cc: 22549@debbugs.gnu.org
Subject: bug#22549: 25.0.50; Tooltips placed outside of screen limits
Date: Fri, 05 Feb 2016 23:34:52 +0100	[thread overview]
Message-ID: <87d1sa23cj.fsf@wanadoo.es> (raw)
In-Reply-To: <56B4DF82.8040106@gmx.at> (martin rudalics's message of "Fri, 05 Feb 2016 18:44:34 +0100")

martin rudalics <rudalics@gmx.at> writes:

> Please try the attached patch.  Glenn gave a recipe how to emulate
> multiple monitors with a single one but I'm a bit reluctant to test it.
> My display resolution setup is somewhat fragile.

The first problem with the patch is that it crashes when there is not an
Emacs frame on some of the monitors. This is solved changing the `if'
to:

          if (CONSP (frames) && !NILP (XCDR (frames))
              && EQ (frame, XCAR (XCDR (frames))))
	    {


The next problem is that the condition

EQ (frame, XCAR (XCDR (frames)))

is always false, which makes sense because `frame' is the tooltip frame
(unless I'm misunderstanding what XSETFRAME does) and it is not listed
on `frames'.

For going ahead I "corrected" this with

      struct frame *sf = XFRAME (selected_frame);
      XSETFRAME (frame, sf);

which is wrong when there is more than one frame, because the tooltip
may be shown for a frame that is not the selected one (showing tooltips
for other than the selected frame seems inappropriate to me, but that's
how Emacs behaves right now).

Then, as the comparision only takes into account the first frame listed
on `frames', even if `frame' where correct (the frame that triggered the
tooltip) it could fail when there is more than one Emacs frame on the
same monitor.

I observed that the tooltip is correctly placed when the right
conditions (see below) are satisfied.

What is missing is to determine the parent frame of the tooltip frame,
instead of using just the selected one as I did, and to search for that
frame on the list of frames associated to the current monitor, instead
of just testing the first frame on the list.





  reply	other threads:[~2016-02-05 22:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04  4:05 bug#22549: 25.0.50; Tooltips placed outside of screen limits Óscar Fuentes
2016-02-04 15:55 ` martin rudalics
2016-02-04 16:20   ` Óscar Fuentes
2016-02-04 16:43     ` Eli Zaretskii
2016-02-04 17:05     ` martin rudalics
2016-02-04 19:16       ` Óscar Fuentes
2016-02-05 17:44         ` martin rudalics
2016-02-05 22:34           ` Óscar Fuentes [this message]
2016-02-06  9:30             ` martin rudalics
2016-02-05 23:52           ` Óscar Fuentes
2016-02-06  9:30             ` martin rudalics
2016-02-06 17:06               ` Óscar Fuentes
2016-02-06 18:09                 ` martin rudalics
2016-02-06 18:52                   ` Óscar Fuentes
2016-02-06 19:44                     ` martin rudalics
2016-02-06 19:49                       ` martin rudalics
2016-02-06 20:34                         ` Óscar Fuentes
2016-02-06 21:23                           ` Óscar Fuentes
2016-02-06 22:56                             ` martin rudalics
2016-02-06 23:22                               ` Óscar Fuentes

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=87d1sa23cj.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=22549@debbugs.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.