protected override void OnRealized() { base.OnRealized(); SetVideoContext(); video_window.Reparent(Parent.Window, 0, 0); }
protected override void OnRealized() { WidgetFlags |= WidgetFlags.Realized; CreateVideoWindow(); GdkWindow = Parent.GdkWindow; video_window.Reparent(GdkWindow, 0, 0); video_window.MoveResize(Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height); video_window.ShowUnraised(); }
protected override void OnRealized() { IsRealized = true; CreateVideoWindow(); Window = Parent.Window; video_window.Reparent(Window, 0, 0); video_window.MoveResize(Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height); video_window.ShowUnraised(); }
protected override void OnRealized() { WidgetFlags |= WidgetFlags.Realized; GdkWindow = Parent.GdkWindow; if (video_window != null) { video_window.Reparent(GdkWindow, 0, 0); video_window.MoveResize(Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height); video_window.ShowUnraised(); return; } Gdk.WindowAttr attributes = new Gdk.WindowAttr(); attributes.WindowType = Gdk.WindowType.Child; attributes.X = 0; attributes.Y = 0; attributes.Width = Allocation.Width; attributes.Height = Allocation.Height; attributes.Visual = Visual; attributes.Wclass = Gdk.WindowClass.InputOutput; attributes.Colormap = Colormap; attributes.EventMask = (int)(Gdk.EventMask.ExposureMask | Gdk.EventMask.VisibilityNotifyMask); Gdk.WindowAttributesType attributes_mask = Gdk.WindowAttributesType.X | Gdk.WindowAttributesType.Y | Gdk.WindowAttributesType.Visual | Gdk.WindowAttributesType.Colormap; video_window = new Gdk.Window(GdkWindow, attributes, attributes_mask); video_window.UserData = Handle; video_window.SetBackPixmap(null, false); if (ServiceManager.PlayerEngine.VideoDisplayContextType == VideoDisplayContextType.GdkWindow) { ServiceManager.PlayerEngine.VideoDisplayContext = video_window.Handle; } else { ServiceManager.PlayerEngine.VideoDisplayContext = IntPtr.Zero; } }