[Xcb] Handling Close Event

Cinolt cinolt.yk at gmail.com
Fri Dec 31 00:06:45 PST 2010


Hello, I'm assuming that I need to call xcb_change_property on my window to
change one of its properties. What should I set the type argument to, and am
I correct in assuming that the data argument should be "WM_DELETE_WINDOW"?

    xcb_void_cookie_t xcb_change_property (xcb_connection_t *c,
/* Connection to the X server */
                                           uint8_t          mode,
/* Property mode */
                                           xcb_window_t     window,
/* Window */
                                           xcb_atom_t       property,
/* Property to change */
                                           xcb_atom_t       type,
/* Type of the property */
                                           uint8_t          format,
/* Format of the property (8, 16, 32) */
                                           uint32_t         data_len,
/* Length of the data parameter */
                                           const void      *data);    /* Data */



On Fri, Dec 31, 2010 at 2:16 AM, Vincent Torri <vtorri at univ-evry.fr> wrote:

>
> Hey,
>
>
> On Fri, 31 Dec 2010, Cinolt wrote:
>
>  Hello all, I'm relatively new to programming in X. I first started
>> learning
>> Xlib and recently found out about XCB and decided to switch. My question
>> is,
>> how can I make my program react to the user closing out of a window before
>> it happens, i.e. to display an "Are you sure?" message. Thanks for any
>> help.
>>
>
> it's an ICCCM thing. Use the WM_DELETE_WINDOW atom [1]
>
> Vincent Torri
>
> [1] http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.8.1
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20101231/3fd3317c/attachment.htm>


More information about the Xcb mailing list