| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 NPN_ReleaseObject(obj); | 771 NPN_ReleaseObject(obj); |
| 772 instance->pdata = NULL; | 772 instance->pdata = NULL; |
| 773 } | 773 } |
| 774 return NPERR_NO_ERROR; | 774 return NPERR_NO_ERROR; |
| 775 } | 775 } |
| 776 | 776 |
| 777 NPError NPP_SetWindow(NPP instance, NPWindow *window) { | 777 NPError NPP_SetWindow(NPP instance, NPWindow *window) { |
| 778 HANDLE_CRASHES; | 778 HANDLE_CRASHES; |
| 779 PluginObject *obj = static_cast<PluginObject*>(instance->pdata); | 779 PluginObject *obj = static_cast<PluginObject*>(instance->pdata); |
| 780 | 780 |
| 781 |
| 781 NPSetWindowCallbackStruct *cb_struct = | 782 NPSetWindowCallbackStruct *cb_struct = |
| 782 static_cast<NPSetWindowCallbackStruct *>(window->ws_info); | 783 static_cast<NPSetWindowCallbackStruct *>(window->ws_info); |
| 783 Window xwindow = reinterpret_cast<Window>(window->window); | 784 Window xwindow = reinterpret_cast<Window>(window->window); |
| 784 if (xwindow != obj->window_) { | 785 if (xwindow != obj->window_) { |
| 785 Display *display = cb_struct->display; | 786 Display *display = cb_struct->display; |
| 786 Window drawable = xwindow; | 787 Window drawable = xwindow; |
| 787 if (g_xembed_support) { | 788 if (g_xembed_support) { |
| 788 // We asked for a XEmbed plugin, the xwindow is a GtkSocket, we create | 789 // We asked for a XEmbed plugin, the xwindow is a GtkSocket, we create |
| 789 // a GtkPlug to go into it. | 790 // a GtkPlug to go into it. |
| 790 obj->gdk_display_ = gdk_display_open(XDisplayString(display)); | 791 obj->gdk_display_ = gdk_display_open(XDisplayString(display)); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 client()->SendResizeEvent(renderer()->width(), renderer()->height(), | 997 client()->SendResizeEvent(renderer()->width(), renderer()->height(), |
| 997 false); | 998 false); |
| 998 SetGtkEventSource(gtk_container_); | 999 SetGtkEventSource(gtk_container_); |
| 999 gtk_widget_destroy(gtk_fullscreen_container_); | 1000 gtk_widget_destroy(gtk_fullscreen_container_); |
| 1000 gtk_fullscreen_container_ = NULL; | 1001 gtk_fullscreen_container_ = NULL; |
| 1001 fullscreen_window_ = 0; | 1002 fullscreen_window_ = 0; |
| 1002 fullscreen_ = false; | 1003 fullscreen_ = false; |
| 1003 } | 1004 } |
| 1004 } // namespace _o3d | 1005 } // namespace _o3d |
| 1005 } // namespace glue | 1006 } // namespace glue |
| OLD | NEW |