diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 5337abc3e4..3cbcd94630 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -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);