the window manager. Its standard definition is @code{ignore}; since the
frame has already been made visible, Emacs has no work to do.
+@cindex @code{touch-end} event
+@item (touch-end (@var{position}))
+This kind of event indicates that the user's finger moved off the
+mouse wheel or the touchpad. The @var{position} element is a mouse
+position list (@pxref{Click Events}), specifying the position of the
+mouse cursor when the finger moved off the mouse wheel.
+
@cindex @code{wheel-up} event
@cindex @code{wheel-down} event
@item (wheel-up @var{position} @var{clicks} @var{lines} @var{pixel-delta})
** New 'min-width' 'display' property.
This allows setting a minimum display width for a region of text.
++++
+** New event type 'touch-end'.
+This event is sent whenever the user's finger moves off the mouse
+wheel on some mice, and when the user's finger moves off the touchpad.
+
** Keymaps and key definitions
+++
;; (define-key global-map [kp-9] 'function-key-error)
;; (define-key global-map [kp-equal] 'function-key-error)
+(define-key global-map [touch-end] 'ignore)
+
;; X11 distinguishes these keys from the non-kp keys.
;; Make them behave like the non-kp keys unless otherwise bound.
;; FIXME: rather than list such mappings for every modifier-combination,
return list2 (head, position);
}
+ case TOUCH_END_EVENT:
+ {
+ Lisp_Object position;
+
+ /* Build the position as appropriate for this mouse click. */
+ struct frame *f = XFRAME (event->frame_or_window);
+
+ if (! FRAME_LIVE_P (f))
+ return Qnil;
+
+ position = make_lispy_position (f, event->x, event->y,
+ event->timestamp);
+
+ return list2 (Qtouch_end, position);
+ }
#ifdef USE_TOOLKIT_SCROLL_BARS
DEFSYM (Qfile_notify, "file-notify");
#endif /* USE_FILE_NOTIFY */
+ DEFSYM (Qtouch_end, "touch-end");
+
/* Menu and tool bar item parts. */
DEFSYM (QCenable, ":enable");
DEFSYM (QCvisible, ":visible");
/* File or directory was changed. */
, FILE_NOTIFY_EVENT
#endif
+
+ /* Either the mouse wheel has been released without it being
+ clicked, or the user has lifted his finger from a touchpad.
+
+ In the future, this may take into account other multi-touch
+ events generated from touchscreens and such. */
+ , TOUCH_END_EVENT
};
/* Bit width of an enum event_kind tag at the start of structs and unions. */
continue;
bool s = signbit (val->emacs_value);
- inev.ie.kind = (val->horizontal
- ? HORIZ_WHEEL_EVENT
- : WHEEL_EVENT);
+ inev.ie.kind = (delta != 0.0
+ ? (val->horizontal
+ ? HORIZ_WHEEL_EVENT
+ : WHEEL_EVENT)
+ : TOUCH_END_EVENT);
inev.ie.timestamp = xev->time;
XSETINT (inev.ie.x, lrint (xev->event_x));
if (NUMBERP (Vx_scroll_event_delta_factor))
scroll_unit *= XFLOATINT (Vx_scroll_event_delta_factor);
- if (val->horizontal)
+ if (delta != 0.0)
{
- inev.ie.arg
- = list3 (Qnil,
- make_float (val->emacs_value
- * scroll_unit),
- make_float (0));
+ if (val->horizontal)
+ {
+ inev.ie.arg
+ = list3 (Qnil,
+ make_float (val->emacs_value
+ * scroll_unit),
+ make_float (0));
+ }
+ else
+ {
+ inev.ie.arg = list3 (Qnil, make_float (0),
+ make_float (val->emacs_value
+ * scroll_unit));
+ }
}
- else
+ else
{
- inev.ie.arg = list3 (Qnil, make_float (0),
- make_float (val->emacs_value
- * scroll_unit));
+ inev.ie.arg = Qnil;
}
kbd_buffer_store_event_hold (&inev.ie, hold_quit);