From cfd2c3524107777a2666fcdf0fd249f29a68a078 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 20 Jan 2016 13:41:06 +0300 Subject: [PATCH] (easy_mouse_translator): minor optimization. --- lib/widget/mouse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/widget/mouse.c b/lib/widget/mouse.c index eca9d7081..3ba30e3d5 100644 --- a/lib/widget/mouse.c +++ b/lib/widget/mouse.c @@ -86,16 +86,13 @@ easy_mouse_translator (Gpm_Event * event, void *data) gboolean run_click = FALSE; mouse_msg_t msg = MSG_MOUSE_NONE; - in_widget = mouse_global_in_widget (event, w); - /* * Very special widgets may want to control area outside their bounds. * For such widgets you will have to turn on the 'forced_capture' flag. * You'll also need, in your mouse handler, to inform the system of * events you want to pass on by setting 'event->result.abort' to TRUE. */ - if (w->Mouse.forced_capture) - in_widget = TRUE; + in_widget = w->Mouse.forced_capture || mouse_global_in_widget (event, w); if ((event->type & GPM_DOWN) != 0) {