From 5b5e713f82e303e26eba24fc7ca7e6fb008f36ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 10 May 2005 11:31:44 +0000 Subject: [PATCH] Skip synchronous mouse polling if the window has B_ASYNCHRONOUS_CONTROLS in its flags. Added a TODO comment git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12618 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/BTextView/TextView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/BTextView/TextView.cpp b/src/kits/interface/BTextView/TextView.cpp index 79ade89712..74848bb3d9 100644 --- a/src/kits/interface/BTextView/TextView.cpp +++ b/src/kits/interface/BTextView/TextView.cpp @@ -521,7 +521,13 @@ BTextView::MouseDown(BPoint where) // no need to track the mouse if we can't select if (!fSelectable) return; - + + // TODO: Honor window flags and skip this + // implementation even if we don't have an alternative + // asynchronous version, yet. + if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) + return; + // track the mouse while it's down int32 start = 0; int32 end = 0; @@ -564,6 +570,9 @@ BTextView::MouseDown(BPoint where) Select(start, end); // Should we scroll the view? + // TODO: the implementation is incorrect, as I think a BTextView + // scrolls regardless of the fact if it is targeted by scroll bars. + // Also: auto scrolling can be disabled, I think. if (!Bounds().Contains(curMouse)) { float hDelta = 0; float vDelta = 0;