unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 27357@debbugs.gnu.org
Subject: bug#27357: 26.0.50; Emacs starts fullscreen in Ubuntu 17.04
Date: Sun, 16 Jul 2017 15:29:13 +0200	[thread overview]
Message-ID: <87bmokqzme.fsf@mouse> (raw)
In-Reply-To: <87h8ycr0qu.fsf@mouse> (Lars Ingebrigtsen's message of "Sun, 16 Jul 2017 15:04:57 +0200")

I found the place where the tooltips are positions, and that seemed like
an easy place to experiment, so I did.

If I divide root_x and root_y by 2, the positioning is exactly as it's
supposed to be.

So the wrong calculations here seem to be completely internal to gtk.
To verify, I did the following:

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2d4abefa96..050433d5c3 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -724,7 +724,10 @@ xg_show_tooltip (struct frame *f, int root_x, int root_y)
   if (x->ttip_window)
     {
       block_input ();
-      gtk_window_move (x->ttip_window, root_x, root_y);
+      printf("Input x %d, y %d\n", root_x, root_y);
+      gtk_window_move (x->ttip_window, root_x/2, root_y/2);
+      gtk_window_get_position (x->ttip_window, &root_x, &root_y);
+      printf("Output x %d, y %d\n", root_x, root_y);
       gtk_widget_show_all (GTK_WIDGET (x->ttip_window));
       unblock_input ();
     }

The output is:

Input x 725, y 464
Output x 362, y 232

So gtk seems to think that we're living in a world where the pixels
passed in are supposed to be doubled from what Emacs is passing it: That
is, that if you send in (2, 2), the physical pixel being addressed is
(4, 4).

Perhaps there's a way to tell gtk to stop doing that?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






  reply	other threads:[~2017-07-16 13:29 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 12:33 bug#27357: 26.0.50; Emacs starts fullscreen in Ubuntu 17.04 Lars Ingebrigtsen
2017-06-14 14:09 ` martin rudalics
2017-06-14 16:38   ` Lars Ingebrigtsen
2017-06-14 17:00     ` Eli Zaretskii
2017-06-14 17:08       ` Lars Ingebrigtsen
2017-06-15  7:59     ` martin rudalics
2017-06-15  9:07       ` Lars Ingebrigtsen
2017-06-15 10:08         ` martin rudalics
2017-06-14 21:50   ` Lars Ingebrigtsen
2017-06-14 22:08     ` Lars Ingebrigtsen
2017-06-15  7:59       ` martin rudalics
2017-06-15  9:11         ` Lars Ingebrigtsen
2017-06-15  9:23           ` Lars Ingebrigtsen
2017-06-15 10:11             ` martin rudalics
2017-07-05 19:42               ` Lars Ingebrigtsen
2017-07-05 20:12                 ` Lars Ingebrigtsen
2017-07-06  6:30                   ` martin rudalics
2017-07-16 12:40                     ` Lars Ingebrigtsen
2017-07-16 12:51                       ` martin rudalics
2017-07-16 13:04                         ` Lars Ingebrigtsen
2017-07-16 13:29                           ` Lars Ingebrigtsen [this message]
2017-07-16 13:34                           ` Lars Ingebrigtsen
2017-07-16 13:45                             ` Lars Ingebrigtsen
2017-07-16 13:55                               ` martin rudalics
2017-07-16 13:59                                 ` Lars Ingebrigtsen
2017-07-16 14:10                                   ` martin rudalics
2017-07-16 14:27                                     ` Lars Ingebrigtsen
2017-07-16 15:05                                       ` Lars Ingebrigtsen
2017-07-16 15:09                                         ` Lars Ingebrigtsen
2017-07-16 16:39                                           ` Dmitry Gutov
2017-07-16 16:49                                             ` Lars Ingebrigtsen
2017-07-17 14:04                                               ` Robert Pluim
2017-07-17 15:00                                                 ` Lars Ingebrigtsen
2017-07-17 15:16                                                   ` Lars Ingebrigtsen
2017-07-16 15:16                                       ` Lars Ingebrigtsen
2017-07-16 16:11                                         ` Lars Ingebrigtsen
2017-07-17  7:03                                           ` martin rudalics
2017-07-16 14:19                                   ` Eli Zaretskii
2017-07-16 14:03                                 ` Lars Ingebrigtsen
2017-07-16 13:54                             ` martin rudalics
2017-06-15 10:09           ` 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=87bmokqzme.fsf@mouse \
    --to=larsi@gnus.org \
    --cc=27357@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 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).