XSetWindowBackgroundPixmap - Xwindows

This is a discussion on XSetWindowBackgroundPixmap - Xwindows ; Hello, I have to implement simple buttons with x lib, so I start to set the button pixmap as the background of the button window and to toggle between the pushed and unpushed pixmap when I receive ButtonPress/Release events. However, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: XSetWindowBackgroundPixmap

  1. XSetWindowBackgroundPixmap

    Hello,
    I have to implement simple buttons with x lib, so I start to set the
    button pixmap as the background of the
    button window and to toggle between the pushed and unpushed pixmap when
    I receive ButtonPress/Release events.
    However, XSetWindowBackgroundPixmap() seems not to work when I call to
    *set another* background (when
    the window is already mapped). I know that a possible solution is to
    draw the pixmap on the window, but this
    induces more event programming (with expose event). What is the better
    solution?
    Thanks,
    gaetano


  2. Re: XSetWindowBackgroundPixmap

    "gaetanoortisi@yahoo.it" writes:

    > I have to implement simple buttons with x lib, so I start to set the
    > button pixmap as the background of the button window and to toggle
    > between the pushed and unpushed pixmap when I receive
    > ButtonPress/Release events. However, XSetWindowBackgroundPixmap()
    > seems not to work when I call to *set another* background (when the
    > window is already mapped). I know that a possible solution is to
    > draw the pixmap on the window, but this induces more event
    > programming (with expose event). What is the better solution?


    Do an XClearWindow() after setting the new background pixmap.

    --
    Måns Rullgård
    mru@inprovide.com

  3. Re: XSetWindowBackgroundPixmap

    thanks


+ Reply to Thread