Enable CEF for Linux.

master
Nicky 2019-01-23 13:34:50 +01:00
parent 0561e56b26
commit 05331254eb
3 changed files with 37 additions and 21 deletions

View File

@ -7,6 +7,7 @@ if (LINUX)
#add_subdirectory(libvlc)
add_subdirectory(example)
add_subdirectory(gstreamer10)
add_subdirectory(cef)
endif (LINUX)
if (DARWIN)

View File

@ -119,6 +119,9 @@ MediaPluginBase(host_send_func, host_user_data)
mPluginsEnabled = false;
mJavascriptEnabled = true;
mDisableGPU = false;
#ifdef LL_LINUX // <FS:ND> Do not use GPU on Linux, using GPU messes with some window managers (https://bitbucket.org/NickyD/phoenix-firestorm-lgpl-linux/commits/14c936db5a02cf0f3ff24eb7f1c92136#comment-6048984)
mDisableGPU = true;
#endif
mUserAgentSubtring = "";
mAuthUsername = "";
mAuthPassword = "";
@ -680,7 +683,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
keyEvent(key_event, native_key_data);
#elif LL_WINDOWS
//#elif LL_WINDOWS // <FS:ND/> Windows & Linux
#else
std::string event = message_in.getValue("event");
LLSD native_key_data = message_in.getValueLLSD("native_key_data");
@ -825,6 +829,17 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat
mCEFLib->nativeKeyboardEventWin(msg, wparam, lparam);
#endif
// <FS:ND> Keyboard handling for Linux.
#if LL_LINUX
uint32_t native_scan_code = (uint32_t)(native_key_data["sdl_sym"].asInteger());
uint32_t native_virtual_key = (uint32_t)(native_key_data["virtual_key"].asInteger());
uint32_t native_modifiers = (uint32_t)(native_key_data["cef_modifiers"].asInteger());
if( native_scan_code == '\n' )
native_scan_code = '\r';
mCEFLib->nativeKeyboardEvent(key_event, native_scan_code, native_virtual_key, native_modifiers);
#endif
// </FS:ND>
};
void MediaPluginCEF::unicodeInput(std::string event, LLSD native_key_data = LLSD::emptyMap())

View File

@ -7,7 +7,7 @@
none
</defaultwidget>
<defaultimpl>
media_plugin_webkit
media_plugin_cef
</defaultimpl>
<widgetset name="web">
<label name="web_label">
@ -141,7 +141,7 @@
none
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="none/none">
@ -152,7 +152,7 @@
none
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="audio/*">
@ -185,7 +185,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
@ -207,7 +207,7 @@
web
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/ogg">
@ -229,7 +229,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/postscript">
@ -240,7 +240,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/rtf">
@ -251,7 +251,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/smil">
@ -262,7 +262,7 @@
movie
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/xhtml+xml">
@ -273,7 +273,7 @@
web
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="application/x-director">
@ -284,7 +284,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="audio/mid">
@ -339,7 +339,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/gif">
@ -350,7 +350,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/jpeg">
@ -361,7 +361,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/png">
@ -372,7 +372,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="image/svg+xml">
@ -383,7 +383,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="image/tiff">
@ -394,7 +394,7 @@
image
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="text/html">
@ -405,7 +405,7 @@
web
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="text/plain">
@ -416,7 +416,7 @@
text
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype name="text/xml">
@ -427,7 +427,7 @@
text
</widgettype>
<impl>
media_plugin_webkit
media_plugin_cef
</impl>
</mimetype>
<mimetype menu="1" name="video/mpeg">