diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 613d15686..57ac76ed9 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1072,7 +1072,15 @@ Image GetClipboardImage(void) if (!dpy) return image; Window root = DefaultRootWindow(dpy); - Window win = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0); + Window win = XCreateSimpleWindow( + dpy, // The connection to the X Server + root, // The 'Parent' window (usually the desktop/root) + 0, 0, // X and Y position on the screen + 1, 1, // Width and Height (1x1 pixel) + 0, // Border width + 0, // Border color + 0 // Background color + ); Atom clipboard = XInternAtom(dpy, "CLIPBOARD", False); Atom targetType = XInternAtom(dpy, "image/png", False); // Ask for PNG diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index cfdd4d51f..651f1206a 100755 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -1030,7 +1030,15 @@ Image GetClipboardImage(void) if (!dpy) return image; Window root = DefaultRootWindow(dpy); - Window win = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0); + Window win = XCreateSimpleWindow( + dpy, // The connection to the X Server + root, // The 'Parent' window (usually the desktop/root) + 0, 0, // X and Y position on the screen + 1, 1, // Width and Height (1x1 pixel) + 0, // Border width + 0, // Border color + 0 // Background color + ); Atom clipboard = XInternAtom(dpy, "CLIPBOARD", False); Atom targetType = XInternAtom(dpy, "image/png", False); // Ask for PNG