Commit 5d17eb48 authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

VlcPluginGtk: fix crash when running under nspluginwrapper

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 338e68c7
......@@ -48,12 +48,6 @@ VlcPluginGtk::~VlcPluginGtk()
{
}
Display *VlcPluginGtk::get_display()
{
return ( (NPSetWindowCallbackStruct *)
npwindow.ws_info )->display;
}
void VlcPluginGtk::set_player_window()
{
libvlc_media_player_set_xwindow(libvlc_media_player,
......@@ -307,6 +301,8 @@ void VlcPluginGtk::update_controls()
bool VlcPluginGtk::create_windows()
{
display = ( (NPSetWindowCallbackStruct *) npwindow.ws_info )->display;
Window socket = (Window) npwindow.window;
GdkColor color_black;
gdk_color_parse("black", &color_black);
......
......@@ -54,7 +54,7 @@ public:
void resize_video_xwindow(GdkRectangle *rect);
private:
void set_player_window();
Display *get_display();
Display *get_display() { return display; }
unsigned int i_width, i_height;
GtkWidget *parent, *parent_vbox, *video_container;
......@@ -62,6 +62,7 @@ private:
GtkWidget *fullscreen_win;
gulong video_container_size_handler_id;
Display *display;
Window video_xwindow;
bool is_fullscreen, is_toolbar_visible;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment