summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x/xcb/ecore_xcb_randr.c
diff options
context:
space:
mode:
authorChris Michael <devilhorns@comcast.net>2013-05-11 16:09:39 +0100
committerChris Michael <devilhorns@comcast.net>2013-05-11 16:30:38 +0100
commitbc31a55bda4dc270fac57b857069de38a05ec59c (patch)
tree6f5f252ff3be2de13818057c8523fe5bd79f4b76 /src/lib/ecore_x/xcb/ecore_xcb_randr.c
parent35b8b8fbf59443e247001758f598e55871ebaa14 (diff)
Add ecore_x_randr_config_timestamp_get to return config timestamp that
XRandr has currently. NB: needed for some updates/fixes to randr dialog. Signed-off-by: Chris Michael <devilhorns@comcast.net>
Diffstat (limited to 'src/lib/ecore_x/xcb/ecore_xcb_randr.c')
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_randr.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
index 2bb43c17ce..a429b35f03 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_randr.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
@@ -254,6 +254,42 @@ ecore_x_randr_version_get(void)
254 return _randr_version; 254 return _randr_version;
255} 255}
256 256
257/**
258 * @brief This function returns the current config timestamp from
259 * XRRScreenConfiguration.
260 *
261 * @params root root window to query screen configuration from
262 *
263 * @returns The screen configuration timestamp
264 *
265 * @since 1.8
266 */
267EAPI Ecore_X_Time
268ecore_x_randr_config_timestamp_get(Ecore_X_Window root)
269{
270 Ecore_X_Time timestamp = 0;
271
272#ifdef ECORE_XCB_RANDR
273 xcb_randr_get_screen_info_cookie_t cookie;
274 xcb_randr_get_screen_info_reply_t *reply;
275#endif
276
277 LOGFN(__FILE__, __LINE__, __FUNCTION__);
278 CHECK_XCB_CONN;
279
280#ifdef ECORE_XCB_RANDR
281 cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
282 reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
283 if (reply)
284 {
285 timestamp = (Ecore_X_Time)reply->config_timestamp;
286 free(reply);
287 }
288#endif
289
290 return timestamp;
291}
292
257/* 293/*
258 * @param root window which's primary output will be queried 294 * @param root window which's primary output will be queried
259 */ 295 */