Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: ecore_x_icccm.c Log Message: Add ecore_x_icccm_state_get() =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_icccm.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ecore_x_icccm.c 10 Feb 2005 12:14:37 -0000 1.18 +++ ecore_x_icccm.c 15 Feb 2005 11:24:25 -0000 1.19 @@ -83,6 +83,37 @@ (unsigned char *)c, 2); } +Ecore_X_Window_State_Hint +ecore_x_icccm_state_get(Ecore_X_Window win) +{ + unsigned char *prop_ret; + Atom type_ret; + unsigned long bytes_after, num_ret; + int format_ret; + Ecore_X_Window_State_Hint hint; + + XGetWindowProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE, + 0, 0x7fffffff, False, ECORE_X_ATOM_WM_STATE, + &type_ret, &format_ret, &num_ret, &bytes_after, + &prop_ret); + if ((prop_ret) && (num_ret == 2)) + { + if (prop_ret[0] == WithdrawnState) + hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN; + else if (prop_ret[0] == NormalState) + hint = ECORE_X_WINDOW_STATE_HINT_NORMAL; + else if (prop_ret[0] == IconicState) + hint = ECORE_X_WINDOW_STATE_HINT_ICONIC; + } + else + hint = ECORE_X_WINDOW_STATE_HINT_NORMAL; + + if (prop_ret) + XFree(prop_ret); + + return hint; +} + void ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t) { @@ -181,13 +212,13 @@ int ecore_x_icccm_hints_get(Ecore_X_Window win, int *accepts_focus, - Ecore_X_Window_State_Hint * initial_state, - Ecore_X_Pixmap * icon_pixmap, - Ecore_X_Pixmap * icon_mask, - Ecore_X_Window * icon_window, - Ecore_X_Window * window_group, int *is_urgent) + Ecore_X_Window_State_Hint *initial_state, + Ecore_X_Pixmap *icon_pixmap, + Ecore_X_Pixmap *icon_mask, + Ecore_X_Window *icon_window, + Ecore_X_Window *window_group, int *is_urgent) { - XWMHints *hints; + XWMHints *hints; if (accepts_focus) *accepts_focus = 0; ------------------------------------------------------- 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