aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-09-18 10:48:11 +0400
committerDmitry Antipov2013-09-18 10:48:11 +0400
commit7a0c745ad134aff0bb8f4258ea607137a819b58d (patch)
treeae24a427e9425302a7953eea18b311214c9664b4 /src/frame.c
parent12679bfd15020087eca82df8dcb5df2c48bcef02 (diff)
downloademacs-7a0c745ad134aff0bb8f4258ea607137a819b58d.tar.gz
emacs-7a0c745ad134aff0bb8f4258ea607137a819b58d.zip
* frame.c (x_mouse_grabbed): New function.
* dispextern.h (x_mouse_grabbed): Add prototype. (last_mouse_frame): Remove declaration. * xterm.h (struct x_display_info): * w32term.h (struct w32_display_info): * nsterm.h (struct ns_display_info): New member last_mouse_frame, going to replace... * xdisp.c (last_mouse_frame): ...global variable. (note_tool_bar_highlight): * w32term.c (w32_mouse_position, w32_read_socket): * xterm.c (XTmouse_position, handle_one_xevent): Use x_mouse_grabbed. * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 365629d0f48..a31bf35aa6b 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3432,7 +3432,16 @@ x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
3432 return; 3432 return;
3433} 3433}
3434 3434
3435 3435/* Non-zero if mouse is grabbed on DPYINFO
3436 and we know the frame where it is. */
3437
3438bool x_mouse_grabbed (Display_Info *dpyinfo)
3439{
3440 return (dpyinfo->grabbed
3441 && dpyinfo->last_mouse_frame
3442 && FRAME_LIVE_P (dpyinfo->last_mouse_frame));
3443}
3444
3436/* Subroutines of creating an X frame. */ 3445/* Subroutines of creating an X frame. */
3437 3446
3438/* Make sure that Vx_resource_name is set to a reasonable value. 3447/* Make sure that Vx_resource_name is set to a reasonable value.