From c4814ed242fe2880c9a064f050217e5c861c338e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 25 Nov 2000 02:07:06 +0000 Subject: [PATCH] more calls for wm stuff.... SVN revision: 3918 --- legacy/ecore/src/Ecore.h | 3 +++ legacy/ecore/src/e_x.c | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/legacy/ecore/src/Ecore.h b/legacy/ecore/src/Ecore.h index 4f1d085aa8..99b031879b 100644 --- a/legacy/ecore/src/Ecore.h +++ b/legacy/ecore/src/Ecore.h @@ -247,6 +247,9 @@ void e_window_del_from_save_set(Window win); void e_window_kill_client(Window win); void e_window_set_border_width(Window win, int bw); int e_window_get_wm_size_hints(Window win, XSizeHints *hints, int *mask); +int e_window_is_visible(Window win); +int e_window_is_normal(Window win); +int e_window_is_manageable(Window win); typedef struct _eev Eevent; typedef struct _ev_fd_handler Ev_Fd_Handler; diff --git a/legacy/ecore/src/e_x.c b/legacy/ecore/src/e_x.c index d181f27ae0..878b6f4556 100644 --- a/legacy/ecore/src/e_x.c +++ b/legacy/ecore/src/e_x.c @@ -2640,3 +2640,48 @@ e_window_get_wm_size_hints(Window win, XSizeHints *hints, int *mask) *mask = (int)sup_ret; return ok; } + +int +e_window_is_visible(Window win) +{ + XWindowAttributes att; + + if (win == 0) + win = default_root; + if (XGetWindowAttributes(disp, win, &att) == True) + { + if (att.map_state == IsUnmapped) return 0; + return 1; + } + return 0; +} + +int +e_window_is_normal(Window win) +{ + XWindowAttributes att; + + if (win == 0) + win = default_root; + if (XGetWindowAttributes(disp, win, &att) == True) + { + if ((att.override_redirect) || (att.class == InputOnly)) return 0; + return 1; + } + return 0; +} + +int +e_window_is_manageable(Window win) +{ + XWindowAttributes att; + + if (win == 0) + win = default_root; + if (XGetWindowAttributes(disp, win, &att) == True) + { + if ((att.map_state == IsUnmapped) || (att.override_redirect) || (att.class == InputOnly)) return 0; + return 1; + } + return 0; +}