Fix GTK window handle calls for mpv embed

This commit is contained in:
Stu 2025-12-13 21:40:04 -05:00
parent ba1db9e16f
commit 08e0da1d45

View File

@ -219,11 +219,7 @@ func getWindowID(w *gdk.Window) uint64 {
// gdkWindowGetXID extracts the XID from a GDK window when running on X11.
func gdkWindowGetXID(w *gdk.Window) uint {
type xidGetter interface {
GetXID() uint
}
if xw, ok := w.(xidGetter); ok {
return xw.GetXID()
}
// gotk3 provides this method on GDK windows under X11
return w.GetXID()
return 0
}