Turns out our pulse mechanism was broken; we need to honour the rate set by
SetPulseRate() even if it is 0. BView::_Attach() and BView::SetFlags() now just set the previous pulse rate again (which will start pulsing in case there is no fPulseRunner yet). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19850 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2a720453e1
commit
6c3692dc87
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Copyright 2001-2007, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -843,7 +843,7 @@ BView::SetFlags(uint32 flags)
|
||||
if (flags & B_PULSE_NEEDED) {
|
||||
check_lock_no_pick();
|
||||
if (fOwner->fPulseRunner == NULL)
|
||||
fOwner->SetPulseRate(500000);
|
||||
fOwner->SetPulseRate(fOwner->PulseRate());
|
||||
}
|
||||
|
||||
if (flags & (B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE
|
||||
@ -4503,7 +4503,7 @@ BView::_Attach()
|
||||
if (fFlags & B_PULSE_NEEDED) {
|
||||
check_lock_no_pick();
|
||||
if (fOwner->fPulseRunner == NULL)
|
||||
fOwner->SetPulseRate(500000);
|
||||
fOwner->SetPulseRate(fOwner->PulseRate());
|
||||
}
|
||||
|
||||
if (!fOwner->IsHidden())
|
||||
|
@ -1448,7 +1448,6 @@ void
|
||||
BWindow::ScreenChanged(BRect screen_size, color_space depth)
|
||||
{
|
||||
// Hook function
|
||||
// does nothing
|
||||
}
|
||||
|
||||
|
||||
@ -1456,7 +1455,7 @@ void
|
||||
BWindow::SetPulseRate(bigtime_t rate)
|
||||
{
|
||||
// TODO: What about locking?!?
|
||||
if (rate < 0 || rate == fPulseRate)
|
||||
if (rate < 0 || rate == fPulseRate || !(rate == 0 ^ fPulseRunner == NULL))
|
||||
return;
|
||||
|
||||
fPulseRate = rate;
|
||||
@ -1480,7 +1479,6 @@ BWindow::SetPulseRate(bigtime_t rate)
|
||||
bigtime_t
|
||||
BWindow::PulseRate() const
|
||||
{
|
||||
// TODO: What about locking?!?
|
||||
return fPulseRate;
|
||||
}
|
||||
|
||||
@ -2378,12 +2376,10 @@ BWindow::_InitData(BRect frame, const char* title, window_look look,
|
||||
AddShortcut('V', B_COMMAND_KEY, new BMessage(B_PASTE), NULL);
|
||||
AddShortcut('A', B_COMMAND_KEY, new BMessage(B_SELECT_ALL), NULL);
|
||||
|
||||
fPulseRate = 0;
|
||||
// We set the default pulse rate, but we don't start the pulse
|
||||
fPulseRate = 500000;
|
||||
fPulseRunner = NULL;
|
||||
|
||||
// TODO: is this correct??? should the thread loop be started???
|
||||
//SetPulseRate( 500000 );
|
||||
|
||||
// TODO: see if you can use 'fViewsNeedPulse'
|
||||
|
||||
fIsFilePanel = false;
|
||||
|
Loading…
Reference in New Issue
Block a user