XRandr has currently.
NB: needed for some updates/fixes to randr dialog.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
EAPI int ecore_x_randr_version_get(void);
EAPI Eina_Bool ecore_x_randr_query(void);
+EAPI Ecore_X_Time ecore_x_randr_config_timestamp_get(Ecore_X_Window root); /** @since 1.8 */
EAPI Ecore_X_Randr_Orientation ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root);
EAPI Ecore_X_Randr_Orientation ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root);
EAPI Eina_Bool ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Orientation orientation);
return _randr_version;
}
+/**
+ * @brief This function returns the current config timestamp from
+ * XRRScreenConfiguration.
+ *
+ * @params root root window to query screen configuration from
+ *
+ * @returns The screen configuration timestamp
+ *
+ * @since 1.8
+ */
+EAPI Ecore_X_Time
+ecore_x_randr_config_timestamp_get(Ecore_X_Window root)
+{
+ Ecore_X_Time timestamp = 0;
+
+#ifdef ECORE_XCB_RANDR
+ xcb_randr_get_screen_info_cookie_t cookie;
+ xcb_randr_get_screen_info_reply_t *reply;
+#endif
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ CHECK_XCB_CONN;
+
+#ifdef ECORE_XCB_RANDR
+ cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
+ reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
+ if (reply)
+ {
+ timestamp = (Ecore_X_Time)reply->config_timestamp;
+ free(reply);
+ }
+#endif
+
+ return timestamp;
+}
+
/*
* @param root window which's primary output will be queried
*/
return _randr_avail;
}
+/**
+ * @brief This function returns the current config timestamp from
+ * XRRScreenConfiguration.
+ *
+ * @params root root window to query screen configuration from
+ *
+ * @returns The screen configuration timestamp
+ *
+ * @since 1.8
+ */
+EAPI Ecore_X_Time
+ecore_x_randr_config_timestamp_get(Ecore_X_Window root)
+{
+ Ecore_X_Time timestamp = 0;
+
+#ifdef ECORE_XRANDR
+ XRRScreenConfiguration *cfg;
+
+ /* try to get the screen configuration from Xrandr */
+ if ((cfg = XRRGetScreenInfo(_ecore_x_disp, root)))
+ {
+ Time tm;
+
+ XRRConfigTimes(cfg, &tm);
+
+ timestamp = (Ecore_X_Time)tm;
+
+ /* free any returned screen config */
+ if (cfg) XRRFreeScreenConfigInfo(cfg);
+ }
+#endif
+
+ return timestamp;
+}
+
/***************************************
* API Functions for RandR version 1.1 *
***************************************/