[PATCH xcb] dpms: Add DPMSInfoNotify event
From: Alexander Volkov See the description in xorgproto repository. Signed-off-by: Alexander Volkov --- src/dpms.xml | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/dpms.xml b/src/dpms.xml index 5581284..51decb7 100644 --- a/src/dpms.xml +++ b/src/dpms.xml @@ -26,7 +26,8 @@ sale, use or other dealings in this Software without prior written authorization from the authors. --> +major-version="1" minor-version="2"> + xproto @@ -84,4 +85,20 @@ authorization from the authors. + + + 0 + + + + + + + + + + + + + -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xcb] dpms: Add DPMSInfoNotify event
From: Alexander Volkov See the description in xorgproto repository. Signed-off-by: Alexander Volkov --- src/dpms.xml | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/dpms.xml b/src/dpms.xml index 5581284..51decb7 100644 --- a/src/dpms.xml +++ b/src/dpms.xml @@ -26,7 +26,8 @@ sale, use or other dealings in this Software without prior written authorization from the authors. --> +major-version="1" minor-version="2"> + xproto @@ -84,4 +85,20 @@ authorization from the authors. + + + 0 + + + + + + + + + + + + + -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xcb] dpms: Add DPMSInfoNotify event
Oh, sorry for sending it twice. See the test program in the attachment. It can be compiled by gcc -o dpmsnotify dpmsnotify.c -lxcb -lxcb-dpms #include #include #include #include int main() { xcb_connection_t*c; xcb_generic_event_t *e; /* Open the connection to the X server */ c = xcb_connect (NULL, NULL); const struct xcb_query_extension_reply_t *dpms = xcb_get_extension_data(c, &xcb_dpms_id); fprintf(stdout, "dpms present %d\n", dpms->present); xcb_dpms_get_version_cookie_t version_cookie = xcb_dpms_get_version(c, XCB_DPMS_MAJOR_VERSION, XCB_DPMS_MINOR_VERSION); xcb_dpms_get_version_reply_t *version_reply = xcb_dpms_get_version_reply(c, version_cookie, NULL); fprintf(stdout, "dpms version %d.%d\n", version_reply->server_major_version, version_reply->server_minor_version); free(version_reply); xcb_dpms_select_input(c, XCB_DPMS_EVENT_MASK_INFO_NOTIFY); xcb_flush (c); while ((e = xcb_wait_for_event (c))) { uint8_t response_type = e->response_type & ~0x80; if (response_type == dpms->first_event + XCB_DPMS_INFO_NOTIFY) { xcb_dpms_info_notify_event_t *info = (xcb_dpms_info_notify_event_t *)e; fprintf(stdout, "dpms state %d, power level %d\n", info->state, info->power_level); } free (e); } return 0; } ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel