From: martin rudalics <rudalics@gmx.at>
To: Jonathan Ganc <jonganc@gmail.com>, 26104@debbugs.gnu.org
Subject: bug#26104: 26.0.50; In Ubuntu, having mouse over other frame cause Alt key to produce a <switch-frame> event
Date: Sat, 08 Apr 2017 10:59:58 +0200 [thread overview]
Message-ID: <58E8A68E.70603@gmx.at> (raw)
In-Reply-To: <573b3947-b433-33b8-2f2a-be39ef1fd3f9@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
> Magical incantations! ;-) I positioned it and then used `xinput
> disable ID` for both my mouse and trackpad.
And what would make you that sure that the `handle-switch-frame' event
was not inserted before you disabled xinput?
Anyway, as a first attempt try to apply the attached patch to keyboard.c
and tell me what the value of the variable `lispy-switch-frame-source'
is when you try your M-y.
martin
[-- Attachment #2: keyboard.c.diff --]
[-- Type: text/plain, Size: 3608 bytes --]
diff --git a/src/keyboard.c b/src/keyboard.c
index 3e50142..f3a9dcf 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3481,6 +3481,7 @@ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
if (single_kboard && kb != current_kboard)
{
+ Vlispy_switch_frame_source = Qkbd_buffer_store_buffered_event;
kset_kbd_queue
(kb, list2 (make_lispy_switch_frame (event->ie.frame_or_window),
make_number (c)));
@@ -4024,7 +4025,10 @@ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
#endif
!EQ (frame, internal_last_event_frame)
&& !EQ (frame, selected_frame))
- obj = make_lispy_switch_frame (frame);
+ {
+ Vlispy_switch_frame_source = Qfocus_in_event;
+ obj = make_lispy_switch_frame (frame);
+ }
else
obj = make_lispy_focus_in (frame);
@@ -4100,7 +4104,10 @@ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
if (! EQ (frame, internal_last_event_frame)
&& !EQ (frame, selected_frame))
- obj = make_lispy_switch_frame (frame);
+ {
+ Vlispy_switch_frame_source = Qdifferent_frame;
+ obj = make_lispy_switch_frame (frame);
+ }
internal_last_event_frame = frame;
/* If we didn't decide to make a switch-frame event, go ahead
@@ -4171,7 +4178,10 @@ static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
if (! EQ (frame, internal_last_event_frame)
&& !EQ (frame, selected_frame))
- obj = make_lispy_switch_frame (frame);
+ {
+ Vlispy_switch_frame_source = Qmouse_track;
+ obj = make_lispy_switch_frame (frame);
+ }
internal_last_event_frame = frame;
}
@@ -9169,6 +9179,7 @@ static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
{
Lisp_Object frame;
XSETFRAME (frame, interrupted_frame);
+ Vlispy_switch_frame_source = Qread_key_sequence;
kset_kbd_queue
(interrupted_kboard,
Fcons (make_lispy_switch_frame (frame),
@@ -10498,9 +10509,11 @@ shows the events before all translations (except for input methods).
if (FRAMEP (internal_last_event_frame)
&& !EQ (internal_last_event_frame, selected_frame))
- do_switch_frame (make_lispy_switch_frame (internal_last_event_frame),
+ {
+ Vlispy_switch_frame_source = Qquit_throw_to_read_char;
+ do_switch_frame (make_lispy_switch_frame (internal_last_event_frame),
0, 0, Qnil);
-
+ }
sys_longjmp (getcjmp, 1);
}
\f
@@ -11242,6 +11255,13 @@ struct event_head
help_form_saved_window_configs = Qnil;
staticpro (&help_form_saved_window_configs);
+ DEFSYM (Qkbd_buffer_store_buffered_event, "kbd_buffer_store_buffered_event");
+ DEFSYM (Qfocus_in_event, "focus_in_event");
+ DEFSYM (Qdifferent_frame, "different_frame");
+ DEFSYM (Qmouse_track, "mouse_track");
+ DEFSYM (Qread_key_sequence, "read_key_sequence");
+ DEFSYM (Qquit_throw_to_read_char, "quit_throw_to_read_char");
+
defsubr (&Scurrent_idle_time);
defsubr (&Sevent_symbol_parse_modifiers);
defsubr (&Sevent_convert_list);
@@ -11833,6 +11853,11 @@ shutdown when Emacs receives a fatal signal (e.g., a crash).
Vwhile_no_input_ignore_events,
doc: /* Ignored events from while-no-input. */);
Vwhile_no_input_ignore_events = Qnil;
+
+ DEFVAR_LISP ("lispy-switch-frame-source",
+ Vlispy_switch_frame_source,
+ doc: /* Source of last lispy-switch-frame event. */);
+ Vlispy_switch_frame_source = Qnil;
}
void
next prev parent reply other threads:[~2017-04-08 8:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 3:25 bug#26104: 26.0.50; In Ubuntu, having mouse over other frame cause Alt key to produce a <switch-frame> event Jonathan Ganc
2017-03-17 7:19 ` martin rudalics
2017-03-18 1:04 ` Jonathan Ganc
2017-03-18 8:19 ` martin rudalics
2017-04-01 9:53 ` martin rudalics
2017-04-04 0:59 ` Jonathan Ganc
2017-04-05 6:58 ` martin rudalics
2017-04-07 3:56 ` Jonathan Ganc
2017-04-07 5:56 ` martin rudalics
2017-04-07 15:27 ` Jonathan Ganc
2017-04-08 8:59 ` martin rudalics [this message]
2017-04-08 22:42 ` Jonathan Ganc
2017-04-09 6:37 ` martin rudalics
2017-04-15 9:41 ` Jonathan Ganc
2017-04-15 14:50 ` martin rudalics
2017-04-15 15:11 ` Eli Zaretskii
2017-04-15 19:39 ` martin rudalics
2017-04-15 20:23 ` Jonathan Ganc
2017-04-16 7:15 ` martin rudalics
2017-04-15 20:33 ` Jonathan Ganc
2022-04-21 15:15 ` Lars Ingebrigtsen
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=58E8A68E.70603@gmx.at \
--to=rudalics@gmx.at \
--cc=26104@debbugs.gnu.org \
--cc=jonganc@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 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).