From e4ba4e04b8ff7c975a5ada2ffdcc2f34ed294653 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 8 Apr 2015 11:30:39 -0400 Subject: HideCursor/ShowCursor: Fix the interpretation of the window argument In the implementation of HideCursor/ShowCursor in the xserver code, the window passed in only identifies a screen, not a portion of the window tree, and it's been that way since the beginning. Changing the implementation at this point would likely break existing code, and the main usage of this protocol (magnifiers) only needs the global behavior, so change the protocol to document the actual behavior. Reviewed-by: Keith Packard Reviewed-by: Daniel Stone Signed-off-by: Owen W. Taylor --- fixesproto.txt | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/fixesproto.txt b/fixesproto.txt index 24c782d..a29ca53 100644 --- a/fixesproto.txt +++ b/fixesproto.txt @@ -525,20 +525,14 @@ HideCursor A client sends this request to indicate that it wants the cursor image to be hidden (i.e. to not be displayed) when - the sprite is inside the specified window, or one of its - subwindows. If the sprite is inside a window for which one - or more active clients have requested cursor hiding then the - cursor image will not be displayed. + the sprite is on the same screen as the specified window. + The sprite will be hidden if one or more clients have called + HideCursor and not ShowCursor. Note that even though cursor hiding causes the cursor image to be invisible, CursorNotify events will still be sent normally, as if the cursor image were visible. - If, during a grab, one or more active clients have requested - cursor hiding for grab window, or one of its ancestors, the - cursor image of the grab cursor will not be displayed during - the lifetime of that grab. - When a client with outstanding cursor hiding requests terminates its connection these requests will be deleted. @@ -552,13 +546,9 @@ ShowCursor window: WINDOW A client sends this request to indicate that it wants the - cursor image to be displayed when the sprite is inside the - specified window, or one of its subwindows. If the sprite - is inside a window for which no active clients have requested - cursor hiding then the cursor image for that window will be - displayed. In other words, if a client calls HideCursor for - a specified window, or window subtree, this request reverses - the effects of the HideCursor request. + cursor image to be displayed when the sprite is on the same + screen as the specified window. The sprite will be hidden + if one or more clients have called HideCursor and not ShowCursor. If the client has made no outstanding HideCursor requests a BadMatch error is generated. -- cgit v1.2.1