Detect recursions of UpdateIfNeeded. This is necessary as we may call hook functions (FrameResized(), FrameMoved()) that in turn could call UpdateIfNeeded again. This is the case for DarkSite which uses GetMouse() inside FrameResized(). This fixes resizing DarkSite and probably fixes bug 539 too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17314 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
035eafc5f3
commit
3279f3b055
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue