[Xcb-commit] tutorial
XCB site
xcb at freedesktop.org
Wed Aug 4 21:46:10 PDT 2010
tutorial/events.mdwn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ff3ba9cfab9eab8dd4a1b568a74f8edade1ff2f9
Author: EamonWalsh <EamonWalsh at web>
Date: Wed Aug 4 21:46:09 2010 -0700
fdo bug 29392: Tutorial uses wrong function
diff --git a/tutorial/events.mdwn b/tutorial/events.mdwn
index 38e906d..f13bef6 100644
--- a/tutorial/events.mdwn
+++ b/tutorial/events.mdwn
@@ -59,7 +59,7 @@ If the window has already been created, we can use the xcb\_change\_window\_attr
const static uint32_t values[] = { XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS };
- xcb_configure_window (connection, window, XCB_CW_EVENT_MASK, values);
+ xcb_change_window_attributes (connection, window, XCB_CW_EVENT_MASK, values);
Note: A common programmer oversight is adding code to handle new event types while forgetting to add the masks for these events in the creation of the window. This leads to programmers debugging for hours, wondering "Why doesn't my program notice that I released the button?", only to find that they registered button press events but not button release events.
More information about the xcb-commit
mailing list