Simplify GTK window retrieval for mpv embed
This commit is contained in:
parent
bab96baee8
commit
1c40324cd6
|
|
@ -73,8 +73,8 @@ func newPane() *pane {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.mpv = mpv
|
p.mpv = mpv
|
||||||
w, ok := da.GetWindow()
|
w := da.GetWindow()
|
||||||
if ok && w != nil {
|
if w != nil {
|
||||||
if xid := getWindowID(w); xid != 0 {
|
if xid := getWindowID(w); xid != 0 {
|
||||||
_ = mpv.SetWID(xid)
|
_ = mpv.SetWID(xid)
|
||||||
}
|
}
|
||||||
|
|
@ -222,5 +222,4 @@ func getWindowID(w *gdk.Window) uint64 {
|
||||||
func gdkWindowGetXID(w *gdk.Window) uint {
|
func gdkWindowGetXID(w *gdk.Window) uint {
|
||||||
// gotk3 provides this method on GDK windows under X11
|
// gotk3 provides this method on GDK windows under X11
|
||||||
return uint(w.GetXID())
|
return uint(w.GetXID())
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user