Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

WebHelper: Initialize GLib's threading system for WebKit to use it

WebKit uses threads but don't seem to initialize the thread system,
causing troubles with GLib versions that doesn't enable threads by
default (< 2.24). So, initialize the thread system ourselves.

Closes #3189033

git-svn-id: https://geany-plugins.svn.sourceforge.net/svnroot/geany-plugins/trunk/geany-plugins@1971 e8383189-8249-0410-b506-acc975200cbd
  • Loading branch information...
commit 0c76f82c40626cb0e0500ef7557d559515d52243 1 parent 0d63e8c
Colomban Wendling b4n authored

Showing 2 changed files with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  build/webhelper.m4
  2. +5 0 webhelper/src/gwh-plugin.c
3  build/webhelper.m4
@@ -23,7 +23,8 @@ AC_DEFUN([GP_CHECK_WEBHELPER],
23 23 glib-2.0 >= ${GLIB_VERSION}
24 24 gio-2.0 >= ${GIO_VERSION}
25 25 gdk-pixbuf-2.0 >= ${GDK_PIXBUF_VERSION}
26   - webkit-1.0 >= ${WEBKIT_VERSION}])
  26 + webkit-1.0 >= ${WEBKIT_VERSION}
  27 + gthread-2.0])
27 28
28 29
29 30 GP_STATUS_PLUGIN_ADD([WebHelper], [$enable_webhelper])
5 webhelper/src/gwh-plugin.c
@@ -416,6 +416,11 @@ plugin_init (GeanyData *data)
416 416 * (g_quark_from_static_string() for example) so it's not safe to remove it */
417 417 plugin_module_make_resident (geany_plugin);
418 418
  419 + /* webkit uses threads but don't initialize the thread system */
  420 + if (! g_thread_supported ()) {
  421 + g_thread_init (NULL);
  422 + }
  423 +
419 424 load_config ();
420 425 gwh_keybindings_init ();
421 426

0 comments on commit 0c76f82

Please sign in to comment.
Something went wrong with that request. Please try again.