Commit 9c660a18 authored by Jan Djärv's avatar Jan Djärv
Browse files

Remove unnecessary redisplays in NS port.

* nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
when setNeedsDisplay is called so we don't trigger redisplay for every
tool bar update.

* nsterm.m (any_help_event_p): New variable.
(mouseMoved:): Set any_help_event_p to YES if help event is
generated.  Remove else with empty help event that triggered redisplay
for every mouse move.
(windowDidResignKey:): If any_help_event_p, generate empty help
event.
parent de12301e
2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
* nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
when setNeedsDisplay is called so we don't trigger redisplay for every
tool bar update.
* nsterm.m (any_help_event_p): New variable.
(mouseMoved:): Set any_help_event_p to YES if help event is
generated. Remove else with empty help event that triggered redisplay
for every mouse move.
(windowDidResignKey:): If any_help_event_p, generate empty help
event.
2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
* xfns.c (Qsuppress_icon): Remove; no real users.
......
......@@ -1152,7 +1152,10 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
FRAME_TOOLBAR_HEIGHT (f) = 0;
if (view->wait_for_tool_bar && FRAME_TOOLBAR_HEIGHT (f) > 0)
{
view->wait_for_tool_bar = NO;
[view setNeedsDisplay: YES];
}
unblock_input ();
}
......
......@@ -283,6 +283,11 @@ - (NSColor *)colorUsingDefaultColorSpace
static BOOL ns_do_open_file = NO;
static BOOL ns_last_use_native_fullscreen;
/* Non-zero means that a HELP_EVENT has been generated since Emacs
start. */
static BOOL any_help_event_p = NO;
static struct {
struct input_event *q;
int nr, cap;
......@@ -5688,14 +5693,10 @@ - (void)mouseMoved: (NSEvent *)e
/* NOTE: help_echo_{window,pos,object} are set in xdisp.c
(note_mouse_highlight), which is called through the
note_mouse_movement () call above */
any_help_event_p = YES;
gen_help_event (help_echo_string, frame, help_echo_window,
help_echo_object, help_echo_pos);
}
else
{
help_echo_string = Qnil;
gen_help_event (Qnil, frame, Qnil, Qnil, 0);
}
if (emacsframe->mouse_moved && send_appdefined)
ns_send_appdefined (-1);
......@@ -5973,6 +5974,14 @@ - (void)windowDidResignKey: (NSNotification *)notification
x_set_frame_alpha (emacsframe);
}
if (any_help_event_p)
{
Lisp_Object frame;
XSETFRAME (frame, emacsframe);
help_echo_string = Qnil;
gen_help_event (Qnil, frame, Qnil, Qnil, 0);
}
if (emacs_event && is_focus_frame)
{
[self deleteWorkingText];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment