Skip to content

Commit fd751be

Browse files
committed
update docs
1 parent 6b90eaa commit fd751be

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/reST/ref/sdl2_video.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,21 @@
101101

102102
.. attribute:: grabbed
103103

104-
| :sl:`Get whether the mouse is confined to the window.`
104+
| :sl:`Get whether the mouse is confined to the window. (**read-only**)`
105105
| :sg:`grabbed -> bool`
106106
107107
.. attribute:: grab_mode
108108

109109
| :sl:`Get or set whether the window is in grab mode.`
110110
| :sg:`grab_mode -> bool`
111111
112+
Get or set whether the window is in grab mode.
113+
When set to ``True``, the window will be able to grab the mouse but
114+
will not confine the mouse immediately. Once the window gains focus,
115+
the mouse will be confined and :attr:`Window.grabbed` turns to ``True``.
116+
Once this attribute is set to ``False`` or the window loses focus,
117+
the mouse will be released and :attr:`Window.grabbed` turns to ``False``
118+
112119
.. attribute:: relative_mouse
113120

114121
| :sl:`Get or set the window's relative mouse mode state`

src_c/doc/sdl2_video_doc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define DOC_SDL2_VIDEO_GETDRIVERS "get_drivers() -> Iterator[RendererDriverInfo]\nYield info about the rendering drivers available for Renderer objects"
66
#define DOC_SDL2_VIDEO_GETGRABBEDWINDOW "get_grabbed_window() -> Window or None\nGet the window with input grab enabled"
77
#define DOC_SDL2_VIDEO_WINDOW "Window(title='pygame window', size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, **kwargs) -> Window\npygame object that represents a window"
8-
#define DOC_SDL2_VIDEO_WINDOW_GRABBED "grabbed -> bool\nGet whether the mouse is confined to the window."
8+
#define DOC_SDL2_VIDEO_WINDOW_GRABBED "grabbed -> bool\nGet whether the mouse is confined to the window. (**read-only**)"
99
#define DOC_SDL2_VIDEO_WINDOW_GRABMODE "grab_mode -> bool\nGet or set whether the window is in grab mode."
1010
#define DOC_SDL2_VIDEO_WINDOW_RELATIVEMOUSE "relative_mouse -> bool\nGet or set the window's relative mouse mode state"
1111
#define DOC_SDL2_VIDEO_WINDOW_TITLE "title -> str\nGet or set the window title"

0 commit comments

Comments
 (0)