From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Alex <agrambot@gmail.com>
Cc: 27647@debbugs.gnu.org, Kaushal Modi <kaushal.modi@gmail.com>
Subject: bug#27647: 26.0.50; Line numbers implemented natively disappear momentarily when frame out of focus
Date: Wed, 08 Nov 2017 21:49:31 -0500 [thread overview]
Message-ID: <87shdo4150.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87efp8jznq.fsf@gmail.com> (Alex's message of "Wed, 08 Nov 2017 14:14:49 -0600")
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
tags 27647 + patch
quit
Alex <agrambot@gmail.com> writes:
> Alex <agrambot@gmail.com> writes:
>
>> I coincidentally stumbled across an easy recipe for this bug (or at
>> least a similar bug):
>>
>> M-: (setq display-line-numbers t)
>> M-: (setq mouse-drag-and-drop-region t)
>>
>> Then select a region, click on it (mouse-1), and drag the mouse. The
>> line numbers will disappear until you release the mouse.
>>
>> Hopefully you can reproduce this on your end this time, Eli. To be
>> clear, this is with a GTK build.
>
> Sorry, I should have also mentioned that this is indeed only the case
> when x-gtk-use-system-tooltips is non-nil.
Aha, the problem is this condition in should_produce_line_number:
static bool
should_produce_line_number (struct it *it)
{
...
/* Don't display line number in tooltip frames. */
if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
return false;
Which sounds like it would be correct, except that the meaning of
tip_frame is different for GTK tooltips, as explained in x_hide_tip:
static Lisp_Object
x_hide_tip (bool delete)
{
...
#ifdef USE_GTK
{
/* When using system tooltip, tip_frame is the Emacs frame on
which the tip is shown. */
struct frame *f = XFRAME (tip_frame);
Implemented in Fx_show_tip:
DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
...
f = decode_window_system_frame (frame);
...
#ifdef USE_GTK
if (x_gtk_use_system_tooltips)
{
...
/* This is used in Fx_hide_tip. */
XSETFRAME (tip_frame, f);
Leading to the following patch:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 871 bytes --]
From de99bf6af06aba4659740b8f3d892ff5db5bce03 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Wed, 8 Nov 2017 21:45:28 -0500
Subject: [PATCH v1] Fix line number display when using gtk tooltips
(Bug#27647)
* src/xdisp.c (should_produce_line_number): Don't check tip_frame when
using gtk tooltips.
---
src/xdisp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 69b74dc629..3b75811cc3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21126,7 +21126,8 @@ should_produce_line_number (struct it *it)
#ifdef HAVE_WINDOW_SYSTEM
/* Don't display line number in tooltip frames. */
- if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
+ if (!x_gtk_use_system_tooltips
+ && FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
return false;
#endif
--
2.11.0
next prev parent reply other threads:[~2017-11-09 2:49 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 20:52 bug#27647: 26.0.50; Line numbers implemented natively disappear momentarily when frame out of focus Kaushal Modi
2017-07-11 2:38 ` Eli Zaretskii
2017-07-11 3:43 ` Kaushal Modi
2017-07-11 14:31 ` Eli Zaretskii
2017-07-11 14:38 ` Kaushal Modi
2017-07-11 20:08 ` Kaushal Modi
2017-07-12 14:44 ` Eli Zaretskii
2017-07-19 15:13 ` Kaushal Modi
2017-07-19 17:34 ` Eli Zaretskii
2017-07-19 17:52 ` Noam Postavsky
2017-07-19 18:09 ` Eli Zaretskii
2017-10-05 12:40 ` Kaushal Modi
2017-10-05 13:03 ` jonas
2017-10-05 13:10 ` Eli Zaretskii
2017-10-05 13:39 ` Eli Zaretskii
2017-10-05 22:17 ` Romanos Skiadas
2017-10-06 8:57 ` Eli Zaretskii
2017-10-11 20:32 ` Romanos Skiadas
2017-10-12 8:29 ` Eli Zaretskii
2017-10-12 19:30 ` Romanos Skiadas
2017-10-13 8:33 ` Eli Zaretskii
2017-10-13 18:14 ` Romanos Skiadas
2017-10-14 7:47 ` Eli Zaretskii
2017-10-15 15:05 ` Romanos Skiadas
2017-10-14 8:36 ` martin rudalics
2017-10-14 10:12 ` Eli Zaretskii
2017-10-15 9:39 ` martin rudalics
2017-10-15 13:25 ` Kaushal Modi
2017-10-16 21:46 ` Kaushal Modi
2017-10-17 8:59 ` martin rudalics
2017-10-17 14:47 ` Eli Zaretskii
2017-10-17 15:07 ` Kaushal Modi
2017-10-17 15:13 ` Kaushal Modi
2017-10-17 16:48 ` Eli Zaretskii
2017-10-15 14:29 ` Eli Zaretskii
2017-11-08 20:08 ` Alex
2017-11-08 20:14 ` Alex
2017-11-09 2:49 ` Noam Postavsky [this message]
2017-11-09 7:28 ` martin rudalics
2017-11-09 15:57 ` Eli Zaretskii
2017-11-09 18:10 ` martin rudalics
2017-11-09 20:53 ` Eli Zaretskii
2017-11-12 10:08 ` martin rudalics
2017-11-12 11:36 ` Eli Zaretskii
2017-11-13 18:45 ` martin rudalics
2017-11-13 19:12 ` Eli Zaretskii
2017-11-14 9:52 ` martin rudalics
2017-11-14 15:47 ` Eli Zaretskii
2017-11-14 18:29 ` martin rudalics
2017-11-14 19:02 ` Eli Zaretskii
2017-11-15 9:22 ` martin rudalics
2017-11-15 10:05 ` martin rudalics
2017-11-18 11:42 ` Eli Zaretskii
2017-11-18 18:25 ` martin rudalics
2017-11-09 13:34 ` Kaushal Modi
2017-11-10 0:38 ` Noam Postavsky
2017-11-09 16:12 ` Eli Zaretskii
2017-11-09 18:14 ` Romanos Skiadas
2017-11-09 20:27 ` Eli Zaretskii
2017-11-10 0:11 ` Noam Postavsky
2017-11-10 8:37 ` Eli Zaretskii
2017-07-21 17:49 ` bug#27647: 26.0.50; Line numbers implemented natively disappear momentarily when, " jonas
2017-07-21 18:57 ` Eli Zaretskii
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=87shdo4150.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=27647@debbugs.gnu.org \
--cc=agrambot@gmail.com \
--cc=kaushal.modi@gmail.com \
/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.