]> git.eshelyaron.com Git - emacs.git/commitdiff
* xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 16 Sep 2013 11:23:03 +0000 (15:23 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Mon, 16 Sep 2013 11:23:03 +0000 (15:23 +0400)
(ignore_next_mouse_click_timeout): Use Time as X does.
(handle_one_xevent): Avoid cast and use unsigned comparison.

src/ChangeLog
src/xterm.c

index 4b862f27a0200f6fb3f1125fd1d27073826c1728..d53f1414917ba4e38ba2dbb1fd4dc20c77241eaa 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-16  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * 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.
+
 2013-09-16  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Do not copy X event in handle_one_xevent except KeyPress case.
index 830fe05e3b81478d0133b2dc3939c0c9d6c20293..89f543abca641bfbb4f54c31545cd99bf53742f2 100644 (file)
@@ -160,20 +160,21 @@ Lisp_Object x_display_name_list;
 static struct frame *pending_autoraise_frame;
 
 #ifdef USE_X_TOOLKIT
+
 /* The application context for Xt use.  */
 XtAppContext Xt_app_con;
 static String Xt_default_resources[] = {0};
 
 /* Non-zero means user is interacting with a toolkit scroll bar.  */
+static bool toolkit_scroll_bar_interaction;
 
-static int toolkit_scroll_bar_interaction;
 #endif /* USE_X_TOOLKIT */
 
 /* Non-zero timeout value means ignore next mouse click if it arrives
    before that timeout elapses (i.e. as part of the same sequence of
    events resulting from clicking on a frame to select it).  */
 
-static unsigned long ignore_next_mouse_click_timeout;
+static Time ignore_next_mouse_click_timeout;
 
 /* Mouse movement.
 
@@ -6893,7 +6894,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                   if (ignore_next_mouse_click_timeout)
                     {
                       if (event->type == ButtonPress
-                          && (int)(event->xbutton.time - ignore_next_mouse_click_timeout) > 0)
+                          && event->xbutton.time > ignore_next_mouse_click_timeout)
                         {
                           ignore_next_mouse_click_timeout = 0;
                           construct_mouse_click (&inev.ie, &event->xbutton, f);