Specifying a Cursor for the Window

The last complication we want to add to this example is a special cursor. Let's arrange for the cursor to look like gumby when it is in our window.

     | ?- create_cursor(gumby, Cursor),
          put_window_attributes(window(1787368), [cursor(Cursor)]).
     
     Cursor = cursor(1787472)
     

This is pretty much what one would expect. X predefines many cursors; pxl-crs lists them. Gumby just happens to be one of them. We could custom design a cursor if we wished, but gumby should be fine for this example.

Try moving your mouse cursor into the hello window, and you will see that it becomes Gumby (or a reasonable facsimile).