unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug with tab bar and event delivery to header line
@ 2019-10-17 20:34 Cecilio Pardo
  2019-10-18  6:38 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Cecilio Pardo @ 2019-10-17 20:34 UTC (permalink / raw)
  To: emacs-devel


Some mouse events are sent to the header line when the pointer is way 
below the header line. I think the problem may be the function 
coordinates_in_window. 
When testing for the header line, it uses the height of the tab bar:

 || (window_wants_header_line (w)
     && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) 
                  + CURRENT_HEADER_LINE_HEIGHT (w)
	 && (part = ON_HEADER_LINE)))

I checked that CURRENT_TAB_LINE_HEIGHT returns a big value even
when there is no tab bar. I don't know if that's correct or not.

-- 
Cecilio Pardo



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with tab bar and event delivery to header line
  2019-10-17 20:34 Bug with tab bar and event delivery to header line Cecilio Pardo
@ 2019-10-18  6:38 ` Eli Zaretskii
  2019-10-18 12:33   ` Cecilio Pardo
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2019-10-18  6:38 UTC (permalink / raw)
  To: Cecilio Pardo; +Cc: emacs-devel

> From: Cecilio Pardo <cpardo@imayhem.com>
> Date: Thu, 17 Oct 2019 22:34:31 +0200
> 
> 
> coordinates_in_window. 
> When testing for the header line, it uses the height of the tab bar:
> 
>  || (window_wants_header_line (w)
>      && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) 
>                   + CURRENT_HEADER_LINE_HEIGHT (w)
> 	 && (part = ON_HEADER_LINE)))
> 
> I checked that CURRENT_TAB_LINE_HEIGHT returns a big value even
> when there is no tab bar. I don't know if that's correct or not.

Please show a recipe to reproduce this, and please tell what value did
you see.  CURRENT_TAB_LINE_HEIGHT returns the height in pixels, not in
screen lines, so maybe that's the reason you thought it was too large?

In any case, if there some scenario where mouse events are interpreted
incorrectly, please report that using report-emacs-bug, together with
all the details necessary to reproduce the problem.  It could be that
the cause is the tab bar, or it could be something else, but the
problem needs to be debugged in either case.

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with tab bar and event delivery to header line
  2019-10-18  6:38 ` Eli Zaretskii
@ 2019-10-18 12:33   ` Cecilio Pardo
  0 siblings, 0 replies; 3+ messages in thread
From: Cecilio Pardo @ 2019-10-18 12:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


>> coordinates_in_window. 
>> When testing for the header line, it uses the height of the tab bar:
>> 
>>  || (window_wants_header_line (w)
>>      && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) 
>>                   + CURRENT_HEADER_LINE_HEIGHT (w)
>> 	 && (part = ON_HEADER_LINE)))
>> 
>> I checked that CURRENT_TAB_LINE_HEIGHT returns a big value even
>> when there is no tab bar. I don't know if that's correct or not.
>
> Please show a recipe to reproduce this, and please tell what value did
> you see.  CURRENT_TAB_LINE_HEIGHT returns the height in pixels, not in
> screen lines, so maybe that's the reason you thought it was too large?

On a window with header line (package-list-packages), move the
mouse pointer to the line inmediately below the header line. Move the
mouse wheel, and get the message:

<header-line> <mouse-5> is undefined

Also, clickable items on the header line are highlighted as if the mouse
was over them when the mouse is on the line below.

Tested on X11 and win32.

With printf, I got sizes 18 and 233 on X11 and Win32, without any tab bar.

> In any case, if there some scenario where mouse events are interpreted
> incorrectly, please report that using report-emacs-bug, together with
> all the details necessary to reproduce the problem.  It could be that
> the cause is the tab bar, or it could be something else, but the
> problem needs to be debugged in either case.

I just did that.
Thank you.

-- 
Cecilio Pardo



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-18 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 20:34 Bug with tab bar and event delivery to header line Cecilio Pardo
2019-10-18  6:38 ` Eli Zaretskii
2019-10-18 12:33   ` Cecilio Pardo

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).