|
@@ -3661,6 +3661,10 @@ bool SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent)
|
|
CHECK_WINDOW_NOT_POPUP(parent, false);
|
|
CHECK_WINDOW_NOT_POPUP(parent, false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (window == parent) {
|
|
|
|
+ return SDL_SetError("Cannot set the parent of a window to itself.");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!_this->SetWindowParent) {
|
|
if (!_this->SetWindowParent) {
|
|
return SDL_Unsupported();
|
|
return SDL_Unsupported();
|
|
}
|
|
}
|