Author Topic: Xlib Assistance, Please  (Read 6184 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Xlib Assistance, Please
« on: December 12, 2007, 09:54:06 pm »
I'm trying to write an app to draw to the root window with Xlib (using C/C++). I can't find a good answer as to how to do this, so could somebody less search-impaired perhaps point me to such a place? Or perhaps provide a brief description/code sample?

Thanks.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

ernestus

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
Xlib Assistance, Please
« Reply #1 on: December 17, 2007, 11:41:23 am »
Doesn't work for you painting on the root directly as an usual window?
haven't tried that, but I think you are allowed to use the "normal" xlib routines to draw on it like it were another, non-root, window.
There is a very simple example in:
http://zez.org/article/articleprint/87/
The only thing you may need to change in that example is the creation of an application window, you don't need it so you can try to paint directly on the root.
I repeat I haven't tried that, but it should work
« Last Edit: December 17, 2007, 11:48:31 am by ernestus »
Zaurus SL-C3200 running pdaxii13.

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Xlib Assistance, Please
« Reply #2 on: December 17, 2007, 02:22:21 pm »
Ah, thank you! I will look at that ASAP.

EDIT: That works! Thank you!
« Last Edit: December 17, 2007, 02:53:02 pm by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo