[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114711: Fix clicks on the menu bar when GPM mouse i
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r114711: Fix clicks on the menu bar when GPM mouse is in use. |
Date: |
Fri, 18 Oct 2013 13:34:00 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114711
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-10-18 16:33:25 +0300
message:
Fix clicks on the menu bar when GPM mouse is in use.
src/keyboard.c (make_lispy_event): Remove GPM-specific code that
handles mouse clicks. Instead, let GPM use the same code as all
the other mice use. See the discussion starting at
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
for the details of the problem with the menu bar this fixes.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/keyboard.c keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-10-18 12:57:44 +0000
+++ b/src/ChangeLog 2013-10-18 13:33:25 +0000
@@ -1,3 +1,11 @@
+2013-10-18 Eli Zaretskii <address@hidden>
+
+ * keyboard.c (make_lispy_event): Remove GPM-specific code that
+ handles mouse clicks. Instead, let GPM use the same code as all
+ the other mice use. See the discussion starting at
+ http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
+ for the details of the problem with the menu bar this fixes.
+
2013-10-18 Dmitry Antipov <address@hidden>
Remove port-specific display name lists to avoid extra
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2013-10-18 04:27:34 +0000
+++ b/src/keyboard.c 2013-10-18 13:33:25 +0000
@@ -5547,6 +5547,9 @@
/* A mouse click. Figure out where it is, decide whether it's
a press, click or drag, and build the appropriate structure. */
case MOUSE_CLICK_EVENT:
+#ifdef HAVE_GPM
+ case GPM_CLICK_EVENT:
+#endif
#ifndef USE_TOOLKIT_SCROLL_BARS
case SCROLL_BAR_CLICK_EVENT:
#endif
@@ -5560,7 +5563,11 @@
position = Qnil;
/* Build the position as appropriate for this mouse click. */
- if (event->kind == MOUSE_CLICK_EVENT)
+ if (event->kind == MOUSE_CLICK_EVENT
+#ifdef HAVE_GPM
+ || event->kind == GPM_CLICK_EVENT
+#endif
+ )
{
struct frame *f = XFRAME (event->frame_or_window);
int row, column;
@@ -6025,55 +6032,6 @@
case CONFIG_CHANGED_EVENT:
return list3 (Qconfig_changed_event,
event->arg, event->frame_or_window);
-#ifdef HAVE_GPM
- case GPM_CLICK_EVENT:
- {
- struct frame *f = XFRAME (event->frame_or_window);
- Lisp_Object head, position;
- Lisp_Object *start_pos_ptr;
- Lisp_Object start_pos;
- int button = event->code;
-
- if (button >= ASIZE (button_down_location))
- {
- ptrdiff_t incr = button - ASIZE (button_down_location) + 1;
- button_down_location = larger_vector (button_down_location,
- incr, -1);
- mouse_syms = larger_vector (mouse_syms, incr, -1);
- }
-
- start_pos_ptr = aref_addr (button_down_location, button);
- start_pos = *start_pos_ptr;
-
- position = make_lispy_position (f, event->x, event->y,
- event->timestamp);
-
- if (event->modifiers & down_modifier)
- *start_pos_ptr = Fcopy_alist (position);
- else if (event->modifiers & (up_modifier | drag_modifier))
- {
- if (!CONSP (start_pos))
- return Qnil;
- event->modifiers &= ~up_modifier;
- }
-
- head = modify_event_symbol (button,
- event->modifiers,
- Qmouse_click, Vlispy_mouse_stem,
- NULL,
- &mouse_syms,
- ASIZE (mouse_syms));
-
- if (event->modifiers & drag_modifier)
- return list3 (head, start_pos, position);
- else if (event->modifiers & double_modifier)
- return list3 (head, position, make_number (2));
- else if (event->modifiers & triple_modifier)
- return list3 (head, position, make_number (3));
- else
- return list2 (head, position);
- }
-#endif /* HAVE_GPM */
/* The 'kind' field of the event is something we don't recognize. */
default:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114711: Fix clicks on the menu bar when GPM mouse is in use.,
Eli Zaretskii <=