From 8c7998ef76a1bcc2f979261c03d4c317cd912754 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sat, 7 May 2005 13:03:20 +0000 Subject: [PATCH] Fixed endless loop when a BWindow is created with the B_ASYNCHRONOUS_CONTROLS flag git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12582 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/RootLayer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/servers/app/RootLayer.cpp b/src/servers/app/RootLayer.cpp index 7367e71b1a..b42df3ad28 100644 --- a/src/servers/app/RootLayer.cpp +++ b/src/servers/app/RootLayer.cpp @@ -1114,7 +1114,11 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg) fResizingWindow = false; STRACE(("MOUSE UP: at (%f, %f)\n", evt.where.x, evt.where.y)); - + + // TODO: This is a quick fix to avoid the endless loop with windows created + // with the B_ASYNCHRONOUS_CONTROLS flag, but please someone have a look into this. + fButtons = 0; + break; } case B_MOUSE_MOVED: @@ -1141,6 +1145,11 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg) debugger("RootLayer::MouseEventHandler: 'target' can't be null.\n"); WinBorder *winBorderUnder = NULL; + // TODO: I think that windows created without the B_ASYNCHRONOUS_CONTROLS flag + // don't receive B_MOUSE_MOVED events after a B_MOUSE_DOWN. Test. + // This will need to be cleaned up as following the code flow + // is very hard. + // fEventMaskLayer is always != this if (fEventMaskLayer) {