more code to do window management

SVN revision: 3913
This commit is contained in:
Carsten Haitzler 2000-11-21 22:35:42 +00:00
parent d379f6b771
commit a90e845d1e
2 changed files with 21 additions and 2 deletions

View File

@ -245,6 +245,8 @@ void e_window_send_client_message(Window win, Atom type, int form
void e_window_add_to_save_set(Window win);
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);
typedef struct _eev Eevent;
typedef struct _ev_fd_handler Ev_Fd_Handler;

View File

@ -1174,7 +1174,8 @@ e_window_get_geometry(Window win, int *x, int *y, int *w, int *h)
if (win == 0)
win = default_root;
if (xid->coords_invalid)
xid = e_validate_xid(win);
if ((xid) && (xid->coords_invalid))
{
Window dw;
int rx, ry;
@ -1187,7 +1188,6 @@ e_window_get_geometry(Window win, int *x, int *y, int *w, int *h)
xid->h = (int)rh;
xid->coords_invalid = 0;
}
xid = e_validate_xid(win);
if (xid)
{
if (x)
@ -2623,3 +2623,20 @@ e_window_kill_client(Window win)
{
XKillClient(disp, (XID)win);
}
void
e_window_set_border_width(Window win, int bw)
{
XSetWindowBorderWidth(disp, win, bw);
}
int
e_window_get_wm_size_hints(Window win, XSizeHints *hints, int *mask)
{
long sup_ret;
Status ok;
ok = XGetWMNormalHints(disp, win, hints, &sup_ret);
*mask = (int)sup_ret;
return ok;
}