diff options
| author | Joakim Verona | 2013-09-12 09:41:49 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-09-12 09:41:49 +0200 |
| commit | 64a5e06b03dc129445712cfca770b886e5f1285f (patch) | |
| tree | 93443b31ffda0001e42960b5aaf711086a82f584 /src | |
| parent | 376499bab806ced18cc52fd7101a2eb70a61a9cc (diff) | |
| parent | 27e90f7752ed9d02cb98dd2dc2886a4f052240ab (diff) | |
| download | emacs-64a5e06b03dc129445712cfca770b886e5f1285f.tar.gz emacs-64a5e06b03dc129445712cfca770b886e5f1285f.zip | |
merge from trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xterm.c | 31 | ||||
| -rw-r--r-- | src/xterm.h | 3 |
3 files changed, 23 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 88aa22b30dc..069a9885b4c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | * xterm.h (x_display_info): New field last_user_time... | ||
| 4 | * xterm.c (toplevel): ...to replace static last_user_time. | ||
| 5 | (handle_one_xevent, x_ewmh_activate_frame): Adjust users. | ||
| 6 | |||
| 7 | 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 8 | |||
| 3 | * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip | 9 | * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip |
| 4 | scroll bar values to prevent thumb from disappear and update comment. | 10 | scroll bar values to prevent thumb from disappear and update comment. |
| 5 | 11 | ||
diff --git a/src/xterm.c b/src/xterm.c index 6004fcf6c0a..04949a3a1dc 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -233,10 +233,6 @@ static Lisp_Object last_mouse_scroll_bar; | |||
| 233 | 233 | ||
| 234 | static Time last_mouse_movement_time; | 234 | static Time last_mouse_movement_time; |
| 235 | 235 | ||
| 236 | /* Time for last user interaction as returned in X events. */ | ||
| 237 | |||
| 238 | static Time last_user_time; | ||
| 239 | |||
| 240 | /* Incremented by XTread_socket whenever it really tries to read | 236 | /* Incremented by XTread_socket whenever it really tries to read |
| 241 | events. */ | 237 | events. */ |
| 242 | 238 | ||
| @@ -5988,7 +5984,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 5988 | break; | 5984 | break; |
| 5989 | 5985 | ||
| 5990 | case SelectionNotify: | 5986 | case SelectionNotify: |
| 5991 | last_user_time = event.xselection.time; | 5987 | dpyinfo->last_user_time = event.xselection.time; |
| 5992 | #ifdef USE_X_TOOLKIT | 5988 | #ifdef USE_X_TOOLKIT |
| 5993 | if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) | 5989 | if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) |
| 5994 | goto OTHER; | 5990 | goto OTHER; |
| @@ -5997,7 +5993,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 5997 | break; | 5993 | break; |
| 5998 | 5994 | ||
| 5999 | case SelectionClear: /* Someone has grabbed ownership. */ | 5995 | case SelectionClear: /* Someone has grabbed ownership. */ |
| 6000 | last_user_time = event.xselectionclear.time; | 5996 | dpyinfo->last_user_time = event.xselectionclear.time; |
| 6001 | #ifdef USE_X_TOOLKIT | 5997 | #ifdef USE_X_TOOLKIT |
| 6002 | if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) | 5998 | if (! x_window_to_frame (dpyinfo, event.xselectionclear.window)) |
| 6003 | goto OTHER; | 5999 | goto OTHER; |
| @@ -6013,7 +6009,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6013 | break; | 6009 | break; |
| 6014 | 6010 | ||
| 6015 | case SelectionRequest: /* Someone wants our selection. */ | 6011 | case SelectionRequest: /* Someone wants our selection. */ |
| 6016 | last_user_time = event.xselectionrequest.time; | 6012 | dpyinfo->last_user_time = event.xselectionrequest.time; |
| 6017 | #ifdef USE_X_TOOLKIT | 6013 | #ifdef USE_X_TOOLKIT |
| 6018 | if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) | 6014 | if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner)) |
| 6019 | goto OTHER; | 6015 | goto OTHER; |
| @@ -6032,7 +6028,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6032 | break; | 6028 | break; |
| 6033 | 6029 | ||
| 6034 | case PropertyNotify: | 6030 | case PropertyNotify: |
| 6035 | last_user_time = event.xproperty.time; | 6031 | dpyinfo->last_user_time = event.xproperty.time; |
| 6036 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); | 6032 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); |
| 6037 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6033 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6038 | if (x_handle_net_wm_state (f, &event.xproperty) | 6034 | if (x_handle_net_wm_state (f, &event.xproperty) |
| @@ -6232,7 +6228,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6232 | 6228 | ||
| 6233 | case KeyPress: | 6229 | case KeyPress: |
| 6234 | 6230 | ||
| 6235 | last_user_time = event.xkey.time; | 6231 | dpyinfo->last_user_time = event.xkey.time; |
| 6236 | ignore_next_mouse_click_timeout = 0; | 6232 | ignore_next_mouse_click_timeout = 0; |
| 6237 | 6233 | ||
| 6238 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 6234 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| @@ -6563,7 +6559,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6563 | #endif | 6559 | #endif |
| 6564 | 6560 | ||
| 6565 | case KeyRelease: | 6561 | case KeyRelease: |
| 6566 | last_user_time = event.xkey.time; | 6562 | dpyinfo->last_user_time = event.xkey.time; |
| 6567 | #ifdef HAVE_X_I18N | 6563 | #ifdef HAVE_X_I18N |
| 6568 | /* Don't dispatch this event since XtDispatchEvent calls | 6564 | /* Don't dispatch this event since XtDispatchEvent calls |
| 6569 | XFilterEvent, and two calls in a row may freeze the | 6565 | XFilterEvent, and two calls in a row may freeze the |
| @@ -6574,7 +6570,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6574 | #endif | 6570 | #endif |
| 6575 | 6571 | ||
| 6576 | case EnterNotify: | 6572 | case EnterNotify: |
| 6577 | last_user_time = event.xcrossing.time; | 6573 | dpyinfo->last_user_time = event.xcrossing.time; |
| 6578 | x_detect_focus_change (dpyinfo, &event, &inev.ie); | 6574 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6579 | 6575 | ||
| 6580 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); | 6576 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); |
| @@ -6599,7 +6595,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6599 | goto OTHER; | 6595 | goto OTHER; |
| 6600 | 6596 | ||
| 6601 | case LeaveNotify: | 6597 | case LeaveNotify: |
| 6602 | last_user_time = event.xcrossing.time; | 6598 | dpyinfo->last_user_time = event.xcrossing.time; |
| 6603 | x_detect_focus_change (dpyinfo, &event, &inev.ie); | 6599 | x_detect_focus_change (dpyinfo, &event, &inev.ie); |
| 6604 | 6600 | ||
| 6605 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); | 6601 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); |
| @@ -6633,7 +6629,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6633 | 6629 | ||
| 6634 | case MotionNotify: | 6630 | case MotionNotify: |
| 6635 | { | 6631 | { |
| 6636 | last_user_time = event.xmotion.time; | 6632 | dpyinfo->last_user_time = event.xmotion.time; |
| 6637 | previous_help_echo_string = help_echo_string; | 6633 | previous_help_echo_string = help_echo_string; |
| 6638 | help_echo_string = Qnil; | 6634 | help_echo_string = Qnil; |
| 6639 | 6635 | ||
| @@ -6776,9 +6772,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6776 | by the rest of Emacs, we put it here. */ | 6772 | by the rest of Emacs, we put it here. */ |
| 6777 | bool tool_bar_p = 0; | 6773 | bool tool_bar_p = 0; |
| 6778 | 6774 | ||
| 6779 | memset (&compose_status, 0, sizeof (compose_status)); | 6775 | memset (&compose_status, 0, sizeof (compose_status)); |
| 6780 | last_mouse_glyph_frame = 0; | 6776 | last_mouse_glyph_frame = 0; |
| 6781 | last_user_time = event.xbutton.time; | 6777 | dpyinfo->last_user_time = event.xbutton.time; |
| 6782 | 6778 | ||
| 6783 | if (dpyinfo->grabbed | 6779 | if (dpyinfo->grabbed |
| 6784 | && last_mouse_frame | 6780 | && last_mouse_frame |
| @@ -8873,8 +8869,9 @@ x_ewmh_activate_frame (struct frame *f) | |||
| 8873 | Lisp_Object frame; | 8869 | Lisp_Object frame; |
| 8874 | XSETFRAME (frame, f); | 8870 | XSETFRAME (frame, f); |
| 8875 | x_send_client_event (frame, make_number (0), frame, | 8871 | x_send_client_event (frame, make_number (0), frame, |
| 8876 | dpyinfo->Xatom_net_active_window, | 8872 | dpyinfo->Xatom_net_active_window, |
| 8877 | make_number (32), list2i (1, last_user_time)); | 8873 | make_number (32), |
| 8874 | list2i (1, dpyinfo->last_user_time)); | ||
| 8878 | } | 8875 | } |
| 8879 | } | 8876 | } |
| 8880 | 8877 | ||
diff --git a/src/xterm.h b/src/xterm.h index f4a2d4c01b2..bdc8523009a 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -301,6 +301,9 @@ struct x_display_info | |||
| 301 | minibuffer. */ | 301 | minibuffer. */ |
| 302 | struct frame *x_highlight_frame; | 302 | struct frame *x_highlight_frame; |
| 303 | 303 | ||
| 304 | /* Time of last user interaction as returned in X events on this display. */ | ||
| 305 | Time last_user_time; | ||
| 306 | |||
| 304 | /* The gray pixmap. */ | 307 | /* The gray pixmap. */ |
| 305 | Pixmap gray; | 308 | Pixmap gray; |
| 306 | 309 | ||