diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index a9f17586fe..99a13223aa 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -1351,11 +1351,10 @@ BView::GetMouse(BPoint *location, uint32 *buttons, bool checkMessageQueue) do_owner_check(); if (checkMessageQueue) { + Window()->UpdateIfNeeded(); BMessageQueue *queue = Window()->MessageQueue(); queue->Lock(); - Window()->UpdateIfNeeded(); - // Look out for mouse update messages BMessage *msg; diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index e7b0c24d98..2e2819eb5d 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1419,6 +1419,11 @@ BWindow::UpdateIfNeeded() if (find_thread(NULL) != Thread()) return; + // if the queue is already locked we are called recursivly + // from our own dispatched update message + if (((const BMessageQueue *)MessageQueue())->IsLocked()) + return; + // make sure all requests that would cause an update have // arrived at the server Sync();