aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-09-16 15:23:03 +0400
committerDmitry Antipov2013-09-16 15:23:03 +0400
commit83a119f8d892a790b25bd0d856df82fb25b0ba72 (patch)
tree7eb161993b9e394f689c9f50f38a8d692aa8945f /src
parent61582e6aadc24dda730055d9907e7c053dd6218b (diff)
downloademacs-83a119f8d892a790b25bd0d856df82fb25b0ba72.tar.gz
emacs-83a119f8d892a790b25bd0d856df82fb25b0ba72.zip
* xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
(ignore_next_mouse_click_timeout): Use Time as X does. (handle_one_xevent): Avoid cast and use unsigned comparison.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xterm.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4b862f27a02..d53f1414917 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12013-09-16 Dmitry Antipov <dmantipov@yandex.ru> 12013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
4 (ignore_next_mouse_click_timeout): Use Time as X does.
5 (handle_one_xevent): Avoid cast and use unsigned comparison.
6
72013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
8
3 Do not copy X event in handle_one_xevent except KeyPress case. 9 Do not copy X event in handle_one_xevent except KeyPress case.
4 Wnen XEvent is processed, it is unlikely to be changed except 10 Wnen XEvent is processed, it is unlikely to be changed except
5 KeyPress case, so we can avoid copying and use const pointer to 11 KeyPress case, so we can avoid copying and use const pointer to
diff --git a/src/xterm.c b/src/xterm.c
index 830fe05e3b8..89f543abca6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -160,20 +160,21 @@ Lisp_Object x_display_name_list;
160static struct frame *pending_autoraise_frame; 160static struct frame *pending_autoraise_frame;
161 161
162#ifdef USE_X_TOOLKIT 162#ifdef USE_X_TOOLKIT
163
163/* The application context for Xt use. */ 164/* The application context for Xt use. */
164XtAppContext Xt_app_con; 165XtAppContext Xt_app_con;
165static String Xt_default_resources[] = {0}; 166static String Xt_default_resources[] = {0};
166 167
167/* Non-zero means user is interacting with a toolkit scroll bar. */ 168/* Non-zero means user is interacting with a toolkit scroll bar. */
169static bool toolkit_scroll_bar_interaction;
168 170
169static int toolkit_scroll_bar_interaction;
170#endif /* USE_X_TOOLKIT */ 171#endif /* USE_X_TOOLKIT */
171 172
172/* Non-zero timeout value means ignore next mouse click if it arrives 173/* Non-zero timeout value means ignore next mouse click if it arrives
173 before that timeout elapses (i.e. as part of the same sequence of 174 before that timeout elapses (i.e. as part of the same sequence of
174 events resulting from clicking on a frame to select it). */ 175 events resulting from clicking on a frame to select it). */
175 176
176static unsigned long ignore_next_mouse_click_timeout; 177static Time ignore_next_mouse_click_timeout;
177 178
178/* Mouse movement. 179/* Mouse movement.
179 180
@@ -6893,7 +6894,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
6893 if (ignore_next_mouse_click_timeout) 6894 if (ignore_next_mouse_click_timeout)
6894 { 6895 {
6895 if (event->type == ButtonPress 6896 if (event->type == ButtonPress
6896 && (int)(event->xbutton.time - ignore_next_mouse_click_timeout) > 0) 6897 && event->xbutton.time > ignore_next_mouse_click_timeout)
6897 { 6898 {
6898 ignore_next_mouse_click_timeout = 0; 6899 ignore_next_mouse_click_timeout = 0;
6899 construct_mouse_click (&inev.ie, &event->xbutton, f); 6900 construct_mouse_click (&inev.ie, &event->xbutton, f);