Skip to content

Some idea about video.Window.grab #2162

Closed
@yunline

Description

@yunline

grab is an attribute represent the status of grabbed mode and should never change unless user changes it.

However, when the window loses focus, the grab attribute change to False but still in the grabbed mode . When gaining focus, the grab attribute will change back to True.

This is not expected, because sometimes when grab is False, user still needs to call grab=False to quit grabbed mode.

So I suggest, remove Window.grab, add Window.grab_mode and Window.grabbed.

  • Window.grab_mode is readable and writable.
  • Window.grabbed is read only.
Condition Window.grab_mode Window.grabbed
Window.grab_mode=False False False
Window.grab_mode=True, but the mouse is not confined to the window True False
Window.grab_mode=True, and the mouse is confined to the window True True

Getter/setter version:

  • Window.get_grabbed()
  • Window.get_grab_mode()
  • Window.set_grab_mode()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions