aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2013-07-21 13:47:07 +0200
committerJan Djärv2013-07-21 13:47:07 +0200
commit96c8b65ebd79360fdcf81786461805bb4377ca11 (patch)
treeff9b11d1f1ff43306f592baee51854037137a518 /src
parent75bdb32ae3715dd438bbc61ab9fce6f89d950e1b (diff)
downloademacs-96c8b65ebd79360fdcf81786461805bb4377ca11.tar.gz
emacs-96c8b65ebd79360fdcf81786461805bb4377ca11.zip
* nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
frame have focus. Fixes: debbugs:14895
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsterm.m18
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e97e07aac60..fb2d875eb26 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-07-21 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
4 frame have focus (Bug#14895).
5
12013-07-21 Paul Eggert <eggert@cs.ucla.edu> 62013-07-21 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Avoid vfork-related deadlock more cleanly. 8 Avoid vfork-related deadlock more cleanly.
diff --git a/src/nsterm.m b/src/nsterm.m
index f3c35e95bfe..61538798337 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4416,6 +4416,7 @@ ns_term_shutdown (int sig)
4416{ 4416{
4417 int type = [theEvent type]; 4417 int type = [theEvent type];
4418 NSWindow *window = [theEvent window]; 4418 NSWindow *window = [theEvent window];
4419
4419/* NSTRACE (sendEvent); */ 4420/* NSTRACE (sendEvent); */
4420/*fprintf (stderr, "received event of type %d\t%d\n", type);*/ 4421/*fprintf (stderr, "received event of type %d\t%d\n", type);*/
4421 4422
@@ -4469,6 +4470,23 @@ ns_term_shutdown (int sig)
4469 } 4470 }
4470 } 4471 }
4471 4472
4473
4474#ifdef NS_IMPL_COCOA
4475 /* If no dialog and none of our frames have focus and it is a move, skip it.
4476 It is a mouse move in an auxillary menu, i.e. on the top right on OSX,
4477 such as Wifi, sound, date or similar.
4478 This prevents "spooky" highlightning in the frame under the menu. */
4479 if (type == NSMouseMoved && [NSApp modalWindow] == nil)
4480 {
4481 struct ns_display_info *di;
4482 BOOL has_focus = NO;
4483 for (di = x_display_list; ! has_focus && di; di = di->next)
4484 has_focus = di->x_focus_frame != 0;
4485 if (! has_focus)
4486 return;
4487 }
4488#endif
4489
4472 [super sendEvent: theEvent]; 4490 [super sendEvent: theEvent];
4473} 4491}
4474 4492