I'm trying to draw some lines and rectangles in a window but the window background color remains white. There are no issues in ubuntu 10.04 LTS with xlib 1.4.? but in archlinux and fedora.
In Fedora I did a strace and ltrace and for some reason the lines and rectangles were drawn then. Executing the same "ltrace ./test" hadn't the same effect in archlinux, the window remained unchanged.
I have no more ideas how to proceed to fix this issue. Did something change in xlib what I'm not aware of?
Last edited by slopjong (2012-10-21 10:33:21)
Works for me using libx11 1.5.0-1 according to pacman. Don't have ltrace or strace installed.
(Edit: Although your source link is broken for me. I found it by git-cloning your repo.)
Have you run pacman -Syu recently?
Last edited by Trent (2012-10-21 16:03:40)
The link also failed for me, but I believe I found what you were talking about. It also fails for me, but I found if I put a "sleep(1)" after the call to your own create_gc function it worked.
I thought to try this as I found it odd to be passing a whole GC as a return value of a function. I'm surprised this would lead to a delay, but it seems to be the case. Passing a pointer to an allocated block for the GC would be better - or just declare it globally.
Edit: nevermind the second part, that didn't hold up to testing. The first part is, however, repeatable.
Edit2: An XFlush at the end of the create_gc function solves this for me.
Last edited by Trilby (2012-10-21 17:29:38)