From 235a8f52c8f74d78040514f71ba5664c913d6622 Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 22 Mar 2011 10:49:46 +0000 Subject: remove XXX and move a configure event out of the event handler functions. reminded by a similiar diff from Thomas Pfaff. ok oga@ --- xutil.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index 2473ecc..b50242a 100644 --- a/xutil.c +++ b/xutil.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xutil.c,v 1.32 2010/05/22 22:32:08 okan Exp $ + * $Id: xutil.c,v 1.33 2011/03/22 10:49:46 okan Exp $ */ #include @@ -118,6 +118,25 @@ xu_key_ungrab(Window win, int mask, int keysym) XUngrabKey(X_Dpy, code, (mask | ign_mods[i]), win); } +void +xu_configure(struct client_ctx *cc) +{ + XConfigureEvent ce; + + ce.type = ConfigureNotify; + ce.event = cc->win; + ce.window = cc->win; + ce.x = cc->geom.x; + ce.y = cc->geom.y; + ce.width = cc->geom.width; + ce.height = cc->geom.height; + ce.border_width = cc->bwidth; + ce.above = None; + ce.override_redirect = 0; + + XSendEvent(X_Dpy, cc->win, False, StructureNotifyMask, (XEvent *)&ce); +} + void xu_sendmsg(Window win, Atom atm, long val) { -- cgit v1.2.3-2-gb3c3