summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x/xcb/ecore_xcb_randr.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-05-08 10:04:23 +0100
committerChris Michael <cp.michael@samsung.com>2013-05-08 10:04:23 +0100
commitb619f84590b8b0dd0bab87eb1af80c90056362bf (patch)
tree76e5e61a33cd81ca5f046fab18d7289b668c83d6 /src/lib/ecore_x/xcb/ecore_xcb_randr.c
parentf5a1889db388d66b1bc621a673d62f3102524981 (diff)
Add missing ecore_x_randr_crtc_clone_set function for xcb.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_x/xcb/ecore_xcb_randr.c')
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_randr.c59
1 files changed, 58 insertions, 1 deletions
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
index 8497da851e..02e8cc25d6 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_randr.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_randr.c
@@ -1992,6 +1992,64 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root,
1992#endif 1992#endif
1993} 1993}
1994 1994
1995EAPI Eina_Bool
1996ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, Ecore_X_Randr_Crtc cln)
1997{
1998 Eina_Bool ret = EINA_FALSE;
1999
2000 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2001 CHECK_XCB_CONN;
2002
2003#ifdef ECORE_XCB_RANDR
2004 RANDR_CHECK_1_2_RET(EINA_FALSE);
2005
2006 if (_randr_version >= RANDR_1_3)
2007 {
2008 xcb_randr_get_screen_resources_current_reply_t *reply;
2009 xcb_timestamp_t stamp = 0;
2010
2011 reply = _ecore_xcb_randr_13_get_resources(root);
2012 if (reply)
2013 {
2014 xcb_randr_get_crtc_info_cookie_t rcookie;
2015 xcb_randr_get_crtc_info_reply_t *rreply;
2016
2017 if (_randr_version >= RANDR_1_3)
2018 stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
2019 else if (_randr_version == RANDR_1_2)
2020 stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
2021
2022 rcookie =
2023 xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, original,
2024 stamp);
2025
2026 rreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn,
2027 rcookie, NULL);
2028 if (rreply)
2029 {
2030 int ox = 0, oy = 0;
2031 Ecore_X_Randr_Orientation orient = 0;
2032 Ecore_X_Randr_Mode mode = -1;
2033
2034 ox = rreply->x;
2035 oy = rreply->y;
2036 orient = rreply->rotation;
2037 mode = rreply->mode;
2038
2039 free(rreply);
2040
2041 ret = ecore_x_randr_crtc_settings_set(root, cln, NULL, -1,
2042 ox, oy, mode, orient);
2043 }
2044
2045 free(reply);
2046 }
2047 }
2048#endif
2049
2050 return ret;
2051}
2052
1995EAPI Ecore_X_Randr_Crtc_Info * 2053EAPI Ecore_X_Randr_Crtc_Info *
1996ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc) 2054ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc)
1997{ 2055{
@@ -2029,7 +2087,6 @@ ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc)
2029 rcookie, NULL); 2087 rcookie, NULL);
2030 if (rreply) 2088 if (rreply)
2031 { 2089 {
2032
2033 if ((ret = malloc(sizeof(Ecore_X_Randr_Crtc_Info)))) 2090 if ((ret = malloc(sizeof(Ecore_X_Randr_Crtc_Info))))
2034 { 2091 {
2035 ret->timestamp = rreply->timestamp; 2092 ret->timestamp = rreply->timestamp;