A two-char comment-starter whose two chars are symbol constituents will
not be noticed if it appears within a word.
+** Multi-pointer X does not work very well
+Emacs is reasonably usable under a multi-pointer X (MPX) environment,
+if you turn off tooltips and mouse highlight, and don't use anything
+that calls `mouse-position'. Otherwise, tooltips are shown next to
+the wrong pointer, mouse highlight simply goes haywire, and
+`mouse-position' returns information for the wrong pointer.
+
+This could be easily fixed in principle, but I cannot find a stable
+enough environment under which the fix can be tested.
+
+The MPX code has not been tested under X toolkit or GTK+ 2.x builds
+and is not expected to work there.
+
\f
This file is part of GNU Emacs.
}
}
+/* Handle an interaction by DEVICE on frame F. TIME is the time of
+ the interaction; if F isn't currently the global focus frame, but
+ is the focus of DEVICE, make it the focus frame. */
+
+static void
+xi_handle_interaction (struct x_display_info *dpyinfo,
+ struct frame *f, struct xi_device_t *device,
+ Time time)
+{
+ bool change;
+
+ change = false;
+
+ if (device->focus_frame == f)
+ {
+ device->focus_frame_time = time;
+ change = true;
+ }
+
+ if (device->focus_implicit_frame == f)
+ {
+ device->focus_implicit_time = time;
+ change = true;
+ }
+
+ /* If F isn't currently focused, update the focus state. */
+ if (change && f != dpyinfo->x_focus_frame)
+ xi_handle_focus_change (dpyinfo);
+}
+
#endif
/* The focus may have changed. Figure out if it is a real focus change,
}
}
+ if (f)
+ {
+ /* If the user interacts with a frame that's focused
+ on another device, but not the current focus
+ frame, make it the focus frame. */
+ if (device)
+ xi_handle_interaction (dpyinfo, f, device,
+ xev->time);
+ }
+
#ifdef USE_GTK
if (!f)
{
f = x_any_window_to_frame (dpyinfo, xev->event);
+ if (f)
+ {
+ /* If the user interacts with a frame that's focused
+ on another device, but not the current focus
+ frame, make it the focus frame. */
+ if (device)
+ xi_handle_interaction (dpyinfo, f, device,
+ xev->time);
+ }
+
XKeyPressedEvent xkey;
memset (&xkey, 0, sizeof xkey);