[Xcb] looking for a short and sweet example of how to use xcb_grab_button.
Micah Nordland
mpnordland at gmail.com
Thu Dec 13 21:27:31 PST 2012
Found the first part of my problem, I had a XCB_GRAB_MODE_SYNC, where I
meant XCB_GRAB_MODE_ASYNC, that made things much better, now to do actual
movement.
On Tue, Dec 11, 2012 at 1:57 PM, Micah Nordland <mpnordland at gmail.com>wrote:
> So I'm trying to grab buttons in my window manager project. I know I need
> to use xcb_grab_button,
> and that I need to pass it the event masks that I want, and finally, I
> need to handle that button in the event loop. I have this code for grabbing
> the button:
> xcb_grab_button(globalconf.conn, 0, _id,
> XCB_EVENT_MASK_BUTTON_PRESS|XCB_EVENT_MASK_BUTTON_RELEASE,
> XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, globalconf.root,
> XCB_NONE,
> 1,
> XCB_BUTTON_MASK_ANY);
>
> I got it from i3's source, and I do get a button press, but no release,
> and after that, mouse input into applications no longer works. This
> (obviously) is not what I want, and I *know* that it can be done. I just
> need to see how it's done right!
>
> --
> Praising my Savior all the day long,
> Micah Nordland
>
>
--
Praising my Savior all the day long,
Micah Nordland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20121214/078bd395/attachment.html>
More information about the Xcb
mailing list