Improve tutorial example
This tutorial example only handles XCB_EXPOSURE and XCB_KEY_RELEASE events and ignores everything else. Thus, there is no point in asking for more kinds of events. A while ago, I ported this tutorial to x11rb [1]. Recently, I received a pull request [2] removing these unnecessary event masks. This commit is thus only partially by me and the 'issue' was originally found by the author of [2]. [1]: https://github.com/psychon/x11rb/blob/master/x11rb/examples/tutorial.rs [2]: https://github.com/psychon/x11rb/pull/754 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9dcb081708
commit
e2ee5aabe9
|
@ -2297,9 +2297,7 @@ int main ()
|
||||||
values[0] = screen->white_pixel;
|
values[0] = screen->white_pixel;
|
||||||
values[1] =
|
values[1] =
|
||||||
XCB_EVENT_MASK_KEY_RELEASE |
|
XCB_EVENT_MASK_KEY_RELEASE |
|
||||||
XCB_EVENT_MASK_BUTTON_PRESS |
|
XCB_EVENT_MASK_EXPOSURE;
|
||||||
XCB_EVENT_MASK_EXPOSURE |
|
|
||||||
XCB_EVENT_MASK_POINTER_MOTION;
|
|
||||||
cookie_window = xcb_create_window_checked (c,
|
cookie_window = xcb_create_window_checked (c,
|
||||||
screen->root_depth,
|
screen->root_depth,
|
||||||
window, screen->root,
|
window, screen->root,
|
||||||
|
|
Loading…
Reference in New Issue