more calls for wm stuff....

SVN revision: 3918
This commit is contained in:
Carsten Haitzler 2000-11-25 02:07:06 +00:00
parent a90e845d1e
commit c4814ed242
2 changed files with 48 additions and 0 deletions

View File

@ -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;

View File

@ -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;
}