From a90e845d1e233c770da53bb3a67cade5b427f4cb Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 21 Nov 2000 22:35:42 +0000 Subject: [PATCH] more code to do window management SVN revision: 3913 --- legacy/ecore/src/Ecore.h | 2 ++ legacy/ecore/src/e_x.c | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/legacy/ecore/src/Ecore.h b/legacy/ecore/src/Ecore.h index 6971a6728e..4f1d085aa8 100644 --- a/legacy/ecore/src/Ecore.h +++ b/legacy/ecore/src/Ecore.h @@ -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; diff --git a/legacy/ecore/src/e_x.c b/legacy/ecore/src/e_x.c index f17b3ca0de..d181f27ae0 100644 --- a/legacy/ecore/src/e_x.c +++ b/legacy/ecore/src/e_x.c @@ -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; +}