Skip to content
Snippets Groups Projects
Commit 81597463 authored by Tofu Linden's avatar Tofu Linden
Browse files

hairy merge of glib restoration

parents b04ca1b0 7295e1ee
Branches
Tags
No related merge requests found
...@@ -50,8 +50,10 @@ set(media_plugin_webkit_LINK_LIBRARIES ...@@ -50,8 +50,10 @@ set(media_plugin_webkit_LINK_LIBRARIES
) )
# Select which VolumeCatcher implementation to use # Select which VolumeCatcher implementation to use
if (LINUX AND PULSEAUDIO) if (LINUX)
if (PULSEAUDIO)
list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp) list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp)
endif (PULSEAUDIO)
list(APPEND media_plugin_webkit_LINK_LIBRARIES list(APPEND media_plugin_webkit_LINK_LIBRARIES
${UI_LIBRARIES} # for glib/GTK ${UI_LIBRARIES} # for glib/GTK
) )
...@@ -65,10 +67,10 @@ elseif (DARWIN) ...@@ -65,10 +67,10 @@ elseif (DARWIN)
) )
elseif (WINDOWS) elseif (WINDOWS)
list(APPEND media_plugin_webkit_SOURCE_FILES windows_volume_catcher.cpp) list(APPEND media_plugin_webkit_SOURCE_FILES windows_volume_catcher.cpp)
else (LINUX AND PULSEAUDIO) else (LINUX)
# All other platforms use the dummy volume catcher for now. # All other platforms use the dummy volume catcher for now.
list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp) list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp)
endif (LINUX AND PULSEAUDIO) endif (LINUX)
set_source_files_properties(${media_plugin_webkit_HEADER_FILES} set_source_files_properties(${media_plugin_webkit_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE) PROPERTIES HEADER_FILE_ONLY TRUE)
......
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
// set to 1 if you're using the version of llqtwebkit that's QPixmap-ified // set to 1 if you're using the version of llqtwebkit that's QPixmap-ified
#if LL_LINUX #if LL_LINUX
# define LL_QTWEBKIT_USES_PIXMAPS 0 # define LL_QTWEBKIT_USES_PIXMAPS 0
extern "C" {
# include <glib.h>
}
#else #else
# define LL_QTWEBKIT_USES_PIXMAPS 0 # define LL_QTWEBKIT_USES_PIXMAPS 0
#endif // LL_LINUX #endif // LL_LINUX
...@@ -129,6 +132,16 @@ class MediaPluginWebKit : ...@@ -129,6 +132,16 @@ class MediaPluginWebKit :
// //
void update(int milliseconds) void update(int milliseconds)
{ {
#if LL_LINUX
// pump glib generously, as Linux browser plugins are on the
// glib main loop, even if the browser itself isn't - ugh
//*TODO: shouldn't this be transparent if Qt was compiled with
// glib mainloop integration? investigate.
GMainContext *mainc = g_main_context_default();
while(g_main_context_iteration(mainc, FALSE));
#endif // LL_LINUX
// pump qt
LLQtWebKit::getInstance()->pump( milliseconds ); LLQtWebKit::getInstance()->pump( milliseconds );
mVolumeCatcher.pump(); mVolumeCatcher.pump();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment