[Xcb] 回复:Re: xcb-xfixes, problem with selection change event.

xiangxw5689 xiangxw5689 at 126.com
Thu Dec 26 07:52:31 PST 2013


Sorry for that.  ^_^
xcb_flush() works. Thanks a lot.
At 2013-12-26 22:39:15,"Uli Schlachter" <psychon at znc.in> wrote:
>Hi,
>
>On 26.12.2013 11:47, xiangxw5689 wrote:
>> I'm looking for help with selection change event in xcb-xfixes.
>> I want capture selection change event and I write a simple program with xcb-xfixes. But it does not work.
>> Please help, thanks.
>
>After reading the above, my first idea is the following:
>
>   http://www.google.com/search?q=how+to+ask+for+help
>
>("It does not work!" is one of the worst kinds of reports possible.)
>
>My next idea was "this mailing list is the wrong place to ask", but whatever....
>
>[...]
>>     // delivers request
>>     mask =  XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE
>>             | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY
>>             | XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER;
>>     xcb_xfixes_select_selection_input_checked(c, win, XCB_ATOM_PRIMARY, mask);
>>     xcb_xfixes_select_selection_input_checked(c, win, XCB_ATOM_SECONDARY, mask);
>> 
>>     // recevie events
>>     uint response_type;
>>     while (e = xcb_wait_for_event(c)) {
>[...]
>
>Your SelectSelectionInput requests are never sent to the server. You have to
>call xcb_flush() somewhere here.
>
>Also, remove the "_checked" from those two function names. For these functions,
>you should capture their return value and eventually call xcb_request_check()
>with the cookie. Since you doin't do this and since I don't think you actually
>want this, just call the unchecked version.
>
>Uli
>-- 
>"In the beginning the Universe was created. This has made a lot of
> people very angry and has been widely regarded as a bad move."
>_______________________________________________
>Xcb mailing list
>Xcb at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list