From 674c8bc8bb662b66fd27ac3875207dd6427e9012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 10 Jul 2008 07:35:47 +0000 Subject: [PATCH] Added TODO about a problem that the late mouse moved message dropping code may have. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26353 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Window.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 379a0f508c..2c55b4f951 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1108,6 +1108,16 @@ FrameMoved(origin); if (transit == B_ENTERED_VIEW || transit == B_EXITED_VIEW) dropIfLate = false; + // TODO: The dropping code may have the following problem: + // On slower computers, 20ms may just be to abitious a delay. + // There, we might constantly check the message queue for a + // newer message, not find any, and still use the only but + // later than 20ms message, which of course makes the whole + // thing later than need be. An adaptive delay would be + // kind of neat, but would probably use additional BWindow + // members to count the successful versus fruitless queue + // searches and the delay value itself or something similar. + if (noHistory || (dropIfLate && (system_time() - eventTime > 20000))) { // filter out older mouse moved messages in the queue