* Re: master 68e293c81d: Fix reporting of imaginary key prefixes on toolkit tool and menu bars [not found] ` <20220302110233.6EBF1C01681@vcs2.savannah.gnu.org> @ 2022-03-02 13:35 ` Robert Pluim 2022-03-02 13:40 ` Po Lu 0 siblings, 1 reply; 3+ messages in thread From: Robert Pluim @ 2022-03-02 13:35 UTC (permalink / raw) To: emacs-devel; +Cc: Po Lu >>>>> On Wed, 2 Mar 2022 06:02:33 -0500 (EST), Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> said: Po> /* Report mouse events on the tab bar and (on GUI frames) on the Po> tool bar. */ Po> @@ -5280,6 +5282,20 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, Po> coordinates. FIXME! */ Po> window_or_frame = Qnil; Po> } Po> + Po> + if (FRAME_TERMINAL (f)->toolkit_position_hook) Po> + { Po> + FRAME_TERMINAL (f)->toolkit_position_hook (f, mx, my, &menu_bar_p, Po> + &tool_bar_p); Po> + Po> + if (NILP (track_mouse) || EQ (track_mouse, Qt)) Po> + { Po> + if (menu_bar_p) Po> + posn = Qmenu_bar; Po> + else if (tool_bar_p) Po> + posn = Qtool_bar; Po> + } Po> + } If the only purpose of menu_bar_p and tool_bar_p is to set an appropriate value for posn, then would it not be simpler to have the hook return the desired value directly? Also, Iʼd put the track_mouse if condition as the outer test, to avoid calling the hook when its value is not actually needed. Robert -- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 68e293c81d: Fix reporting of imaginary key prefixes on toolkit tool and menu bars 2022-03-02 13:35 ` master 68e293c81d: Fix reporting of imaginary key prefixes on toolkit tool and menu bars Robert Pluim @ 2022-03-02 13:40 ` Po Lu 2022-03-02 14:00 ` Robert Pluim 0 siblings, 1 reply; 3+ messages in thread From: Po Lu @ 2022-03-02 13:40 UTC (permalink / raw) To: Robert Pluim; +Cc: emacs-devel Robert Pluim <rpluim@gmail.com> writes: > If the only purpose of menu_bar_p and tool_bar_p is to set an > appropriate value for posn, then would it not be simpler to have the > hook return the desired value directly? It would be simpler, but this is going to be used in some other places as well (to fix toolbar clicks not working after a passive grab on an xwidget is released on top, for example.) > Also, Iʼd put the track_mouse if condition as the outer test, to avoid > calling the hook when its value is not actually needed. Sure thing, thanks. I assumed it would be clearer this way since the comment on top describes that test as a temporary solution. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 68e293c81d: Fix reporting of imaginary key prefixes on toolkit tool and menu bars 2022-03-02 13:40 ` Po Lu @ 2022-03-02 14:00 ` Robert Pluim 0 siblings, 0 replies; 3+ messages in thread From: Robert Pluim @ 2022-03-02 14:00 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel >>>>> On Wed, 02 Mar 2022 21:40:35 +0800, Po Lu <luangruo@yahoo.com> said: Po> Robert Pluim <rpluim@gmail.com> writes: >> If the only purpose of menu_bar_p and tool_bar_p is to set an >> appropriate value for posn, then would it not be simpler to have the >> hook return the desired value directly? Po> It would be simpler, but this is going to be used in some other places Po> as well (to fix toolbar clicks not working after a passive grab on an Po> xwidget is released on top, for example.) OK >> Also, Iʼd put the track_mouse if condition as the outer test, to avoid >> calling the hook when its value is not actually needed. Po> Sure thing, thanks. I assumed it would be clearer this way since the Po> comment on top describes that test as a temporary solution. If tax law in my country of residence is anything to go by, thereʼs nothing more permanent than a temporary solution :-) Robert -- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-02 14:00 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <164621895282.6121.1451131016594498963@vcs2.savannah.gnu.org> [not found] ` <20220302110233.6EBF1C01681@vcs2.savannah.gnu.org> 2022-03-02 13:35 ` master 68e293c81d: Fix reporting of imaginary key prefixes on toolkit tool and menu bars Robert Pluim 2022-03-02 13:40 ` Po Lu 2022-03-02 14:00 ` Robert Pluim
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.