From 259233e466e8513840de1dbdd88247de43fc52a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 13 Sep 2007 15:02:29 +0000 Subject: [PATCH] * added NOTE on why having mouse coords in screen space until the very last moment is so nice git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22228 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/View.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 51e54b172f..d06b5a1263 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -1470,6 +1470,11 @@ BView::GetMouse(BPoint *location, uint32 *buttons, bool checkMessageQueue) ConvertFromScreen(location); // TODO: in beos R5, location is already converted to the view local coordinate system, // so if an app checks the window message queue by itself, it might not find what it expects. + // NOTE: the fact that we have mouse coords in screen space in our queue avoids the problem + // that messages already in the queue will be outdated as soon as a window or even the + // view moves. The second situation being quite common actually, also with regards to + // scrolling. An app reading these messages would have to know the locations of the window + // and view for each message... otherwise it is potentially broken anyways. } else *buttons = 0; }