From 08a24fcc313dc5f5f71c38d10163589e267a6206 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 28 Jan 2010 02:31:37 +0000 Subject: (svn r18933) -Codechange: Don't constantly redraw a window when moving it unless it actually moves. --- src/window.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index ee5b04093..f89c0abe1 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1513,6 +1513,9 @@ static bool HandleWindowDragging() /* Get out immediately if no window is being dragged at all. */ if (!_dragging_window) return true; + /* If button still down, but cursor hasn't moved, there is nothing to do. */ + if (_left_button_down && _cursor.delta.x == 0 && _cursor.delta.y == 0) return false; + /* Otherwise find the window... */ Window *w; FOR_ALL_WINDOWS_FROM_BACK(w) { -- cgit v1.2.3-54-g00ecf