windowless moonlight
A little while ago I committed the first ugly pass at windowless support in moonlight. By ugly I just mean I cut corners wherever I could, just to get it working. The changes to support both windowed and windowless modes, with events coming in as either GdkEvents or Xlib events.. well, they’re a little gross
but we’ll get them refactored and beautified soon enough.
On to the goods.
Silverlight 1.0 has no built-in text input support, so the conventional wisdom says “use windowless mode, and use an overlayed html form element to allow input.” Many sites use this, such as the weatherwidget:
The vista simulator (which is a pretty crazy body of code. *Tons* of javascript, and an architecture that leads me to believe it wasn’t originally intended for silverlight) uses windowless mode for another reason. It doesn’t hook up events handlers to any of the xaml elements. Instead, it adds JS event handlers to the <object> tag that surrounds the plugin. Since there are no event handlers in the plugin, we return FALSE to signal we didn’t handle the event, which bubbles up the dom hierarchy to the object.
You need svn HEAD of the moonlight code for this to work, and you also need to run it against a build of firefox3. Unfortunately, given our use of unfrozen apis for dealing with the dom element reflection into managed code, you’ll more than likely run up against undefined C++ symbols for pages that do that sort of thing. But there are a number of sites which don’t. So give it a try ![]()
[…] good news is that Chris has implemented the support for […]
Pingback by Miguel de Icaza: Pre-Mix 08: Moonlight Updates - 工程師的雞排攤 — March 4, 2008 @ 3:23 am