BView::SetEventMask() had no effect when called before AttachedToWindow().

This also fixes bug #620.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17802 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-06-12 21:54:24 +00:00
parent d367028c04
commit 66e114c429

View File

@ -521,6 +521,13 @@ ServerWindow::_CreateLayerTree(BPrivate::LinkReceiver &link, ViewLayer **_parent
newLayer->SetHidden(hidden);
newLayer->SetEventMask(eventMask, eventOptions);
if (eventMask != 0 || eventOptions != 0) {
fDesktop->UnlockSingleWindow();
fDesktop->EventDispatcher().AddListener(EventTarget(),
newLayer->Token(), eventMask, eventOptions);
fDesktop->LockSingleWindow();
}
DesktopSettings settings(fDesktop);
ServerFont font;
settings.GetDefaultPlainFont(font);