How to get the current cursor of a Window?

2021-02-20 Thread Phillip Bushee
I can set the cursor to be displayed on a window in a XSetWindowAttributes(3) structure while creating a window, or with XDefineCursor(3) after the window is created. But how can I get the current cursor of a window? The XWindowAttributes(3) structure does not contain a Cursor entry, so I cannot

Segmentation fault on XpmCreateImageFromData(3)

2021-03-24 Thread Phillip Bushee
I'm am writing a window manager which uses XpmCreateImageFromData(3) to read a .xpm file containing the theme of the decoration of the windows. The program segfaults when calling this function. I use this function rather than XpmCreatePixmapFromData(3) in order for me to get a pixel color from t