Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: ecore_x_netwm.c Log Message: Fix ecore_x_netwm_strut_partial_set() Always return 0 or 1 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_netwm.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ecore_x_netwm.c 7 Feb 2005 13:51:02 -0000 1.9 +++ ecore_x_netwm.c 15 Feb 2005 11:21:47 -0000 1.10 @@ -574,8 +574,11 @@ int ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk) { - return ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP, - desk, 1); + int ret; + ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP, + desk, 1); + + return ret == 1 ? 1 : 0; } /* @@ -612,8 +615,8 @@ ret = ecore_x_netwm_strut_partial_get(win, left, right, top, bottom, &left_start_y, &left_end_y, &right_start_y, &right_end_y, &top_start_x, &top_end_x, &bottom_start_x, &bottom_end_x); - if (ret) - return ret; + if (ret == 12) + return 1; ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4); if (ret != 4) @@ -646,7 +649,7 @@ strut[9] = top_end_x; strut[10] = bottom_start_x; strut[11] = bottom_end_x; - ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 12); + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, strut, 12); } int @@ -716,8 +719,10 @@ int ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid) { - return ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_PID, - pid, 1); + int ret; + ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_PID, + pid, 1); + return ret == 1 ? 1 : 0; } void @@ -746,8 +751,10 @@ int ecore_x_netwm_user_time_get(Ecore_X_Window win, int *time) { - return ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME, - time, 1); + int ret; + ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME, + time, 1); + return ret == 1 ? 1 : 0; } static Ecore_X_Atom @@ -793,7 +800,7 @@ Ecore_X_Atom *atoms, atom; if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_NET_WM_STATE, - XA_ATOM, 32, &data, &num)) + XA_ATOM, 32, &data, &num)) return ret; atom = _ecore_x_netwm_state_atom_get(s); @@ -1091,8 +1098,10 @@ int ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity) { - return ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, - opacity, 1); + int ret; + ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, + opacity, 1); + return ret == 1 ? 1 : 0; } void ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs