Ignore:
Timestamp:
Jun 26, 2012, 2:04:16 AM (13 years ago)
Author:
dmik
Message:

icedtea-web: Use g_main_context_os2_start_pm_integration() on OS/2.

This is to make sure that GLib events are handled correctly when the main
PM message loop is run externally WRT the plugin code (e.g. by Firefox).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc

    r377 r383  
    22662266#endif
    22672267
     2268#ifndef __OS2__
    22682269  // Make sure the plugin data directory exists, creating it if
    22692270  // necessary.
     
    22742275      return NPERR_OUT_OF_MEMORY_ERROR;
    22752276    }
    2276   gchar* filename = NULL;
    22772277
    22782278  // If P_tmpdir does not exist, try /tmp directly
     
    22812281                    (GFileTest) (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)))
    22822282    {
    2283       int file_error = 0;
    2284 
    22852283      data_directory = g_strconcat ("/tmp", NULL);
    22862284        if (!data_directory)
     
    23302328
    23312329    }
     2330#endif
    23322331
    23332332  // Set appletviewer_executable.
    2334   filename = g_strdup(ICEDTEA_WEB_JRE);
     2333  gchar* filename = g_strdup(ICEDTEA_WEB_JRE);
    23352334  appletviewer_executable = g_strdup_printf ("%s/bin/java",
    23362335                                             filename);
     
    23512350  g_free (filename);
    23522351
    2353   initialized = true;
    2354 
    23552352  // Initialize threads (needed for mutexes).
    23562353  if (!g_thread_supported ())
    23572354    g_thread_init (NULL);
     2355
     2356#ifdef __OS2__
     2357  if (!g_main_context_os2_start_pm_integration (NULL))
     2358  {
     2359    PLUGIN_DEBUG ("Failed to integrate with PM");
     2360    np_error = NPERR_GENERIC_ERROR;
     2361    goto cleanup_appletviewer_executable;
     2362  }
     2363#endif
    23582364
    23592365  plugin_instance_mutex = g_mutex_new ();
     
    23912397  pthread_mutexattr_destroy(&attribute);
    23922398
     2399  initialized = true;
     2400
    23932401  PLUGIN_DEBUG ("NP_Initialize return\n");
    23942402
     
    24882496{
    24892497  PLUGIN_DEBUG ("NP_Shutdown\n");
     2498
     2499#ifdef __OS2__
     2500  g_main_context_os2_stop_pm_integration (NULL);
     2501#endif
    24902502
    24912503  // Free mutex.
Note: See TracChangeset for help on using the changeset viewer.