Ignore:
Timestamp:
Jun 5, 2012, 9:51:10 AM (13 years ago)
Author:
dmik
Message:

icedtea-web: Wrap OS/2 HWND in WinOS2 HWND.

Java expects WinOS2 HWNDs while the plugin gets the OS/2 HWND
from the browser.

This commit also includes some source file reorganization (for clarity).

File:
1 edited

Legend:

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

    r374 r377  
    4545#include <emx/startup.h>
    4646#include <sys/socket.h>
     47#include "OS_OS2.h"
    4748#endif
    4849
     
    6162#include "IcedTeaScriptablePluginObject.h"
    6263#include "IcedTeaNPPlugin.h"
    63 
    64 #include "OS.h"
    6564
    6665#ifdef __OS2__
     
    777776    }
    778777
     778#ifdef __OS2__
     779  void *wnd = wrap_window_handle (window->window);
     780  if (!wnd)
     781      return NPERR_GENERIC_ERROR;
     782
     783  PLUGIN_DEBUG ("ITNP_SetWindow: wrapped window handle %d (%x) in %d (%x)\n",
     784                window->window, window->window, wnd, wnd);
     785#endif
     786
    779787  if (data->window_handle)
    780788    {
    781789      // The window already exists.
    782       if (data->window_handle == window->window)
     790      if (data->window_handle == wnd)
    783791    {
    784792          // The parent window is the same as in previous calls.
     
    851859
    852860      // Store the window handle and dimensions
    853       data->window_handle = window->window;
     861      data->window_handle = wnd;
    854862      data->window_width = window->width;
    855863      data->window_height = window->height;
     
    22492257    return NPERR_NO_ERROR;
    22502258
     2259#ifdef __OS2__
     2260  // perform OS-specific initialization
     2261  if (!init_os())
     2262    {
     2263      PLUGIN_ERROR ("Failed to perform OS-specific initialization.");
     2264      return NPERR_GENERIC_ERROR;
     2265    }
     2266#endif
     2267
    22512268  // Make sure the plugin data directory exists, creating it if
    22522269  // necessary.
Note: See TracChangeset for help on using the changeset viewer.