x11rb: cairo example does not work
Hi, the cairo example for me does not draw anything, it crates the transparent window but doesn’t draw anything Console output
MapNotify(MapNotifyEvent { response_type: 19, sequence: 26, event: 96468992, window: 96468992, override_redirect: false }))
Got an unknown event
Expose(ExposeEvent { response_type: 12, sequence: 26, window: 96468992, x: 0, y: 0, width: 100, height: 100, count: 0 }))
ConfigureNotify(ConfigureNotifyEvent { response_type: 150, sequence: 26, event: 96468992, window: 96468992, above_sibling: 0, x: 910, y: 479, width: 100, height: 100, border_width: 0, override_redirect: false }))
UnmapNotify(UnmapNotifyEvent { response_type: 18, sequence: 52, event: 96468992, window: 96468992, from_configure: false }))
Got an unknown event
MapNotify(MapNotifyEvent { response_type: 19, sequence: 52, event: 96468992, window: 96468992, override_redirect: false }))
Got an unknown event
Expose(ExposeEvent { response_type: 12, sequence: 52, window: 96468992, x: 0, y: 0, width: 100, height: 100, count: 0 }))
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
https://docs.rs/x11rb/0.10.1/x11rb/?search=ClipOrdering says it is https://docs.rs/x11rb/0.10.1/x11rb/protocol/xproto/struct.ClipOrdering.html
You can add the
_NET_WM_STATE_ABOVEvalue to the_NET_WM_STATEproperty (see https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html). You will need theintern_atomandchange_propertyrequests for that.You need to enable the
shapefeature of x11rb.The example here does that: https://github.com/psychon/x11rb/issues/26
The important part is this:
Argh. Thanks for that! From the docs for FreeColormap: https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:FreeColormap
Now, I do not really know why this makes a difference (the colormap is not used for anything). But whatever, if it works like that, it works like that…
I think I figured it out
Check that
Colormap: 0x0. After commentingconn.free_colormap(colormap)the example works. It looks like colormaps are not reference counted.