Artifact 519422f2884106dedd4a43f10b85d991f1785a915a92622e6dc260900f5ff351:
- File lib/libstuff/x11/windows/getwinrect.c — part of check-in [15eae1e8e6] at 2019-06-20 16:42:23 on branch trunk — Import sources to have something to work with (user: KhazAkar size: 348)
/* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail> * See LICENSE file for license details. */ #include "../x11.h" Rectangle getwinrect(Window *w) { XWindowAttributes wa; Point p; if(!XGetWindowAttributes(display, w->xid, &wa)) return ZR; p = translate(w, &scr.root, ZP); return rectaddpt(Rect(0, 0, wa.width, wa.height), p); }