Skip to content

Commit fae899b

Browse files
committed
Deprecate input_only argument
1 parent c00ff29 commit fae899b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/reST/ref/window.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,10 @@
403403

404404
:param bool input_only: if ``True``, the window will be given input focus
405405
but may be completely obscured by other windows.
406-
Only supported on X11.
406+
Only supported on X11. This has been deprecated and
407+
may be removed in a future version.
408+
409+
.. deprecated:: 2.5.3 ``input_only`` argument
407410

408411
.. method:: restore
409412

src_c/window.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ window_focus(pgWindowObject *self, PyObject *args, PyObject *kwargs)
289289
return NULL;
290290
}
291291
if (input_only) {
292+
if (PyErr_WarnEx(PyExc_DeprecationWarning,
293+
"The input_only kwarg has been deprecated and may be "
294+
"removed in a future version",
295+
1) == -1) {
296+
return NULL;
297+
}
292298
if (SDL_SetWindowInputFocus(self->_win)) {
293299
return RAISE(pgExc_SDLError, SDL_GetError());
294300
}

0 commit comments

Comments
 (0)