WMII Reforge  Artifact [31fc99fa0c]

Artifact 31fc99fa0c2f6b2e9b1926033c6e9dda88681285d7b4ef37725a803f29197b74:

  • File lib/libstuff/x11/windows/findwin.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: 318)

/* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
 * See LICENSE file for license details.
 */
#include "../x11.h"
#include <assert.h>

Window*
findwin(XWindow xw) {
	Window *w;
	void **e;

	e = map_get(&windowmap, (ulong)xw, false);
	if(e) {
		w = *e;
		assert(w->xid == xw);
		return w;
	}
	return nil;
}