From 00a5144b18f262be83bb76d494d97ccc78fad37d Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 12 Jan 2018 22:54:28 -0500 Subject: [PATCH] After Bill Gray: "Don't redraw the entire screen each time a mouse button goes up." --- x11/x11.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/x11/x11.c b/x11/x11.c index 94e989da..99934e0a 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -1016,8 +1016,7 @@ static void _refresh_screen(void) } } - if (mouse_selection) - _selection_off(); + _selection_off(); } static void _handle_expose(Widget w, XtPointer client_data, XEvent *event, @@ -1596,12 +1595,15 @@ static void _selection_off(void) { XC_LOG(("_selection_off() - called\n")); - _display_screen(); + if (mouse_selection) + { + _display_screen(); - selection_start_x = selection_start_y = selection_end_x = - selection_end_y = 0; + selection_start_x = selection_start_y = selection_end_x = + selection_end_y = 0; - mouse_selection = FALSE; + mouse_selection = FALSE; + } } static void _selection_on(int x, int y)