From e486eca576ea66b79546c532715971cf6e56cdfe Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 30 Jun 2015 14:01:43 +0000 Subject: Re-implement XClientMessage handling so that we can feed screen_find and client_find valid resources as needed, relieving the need for screen_find to ungracefully handle invalid root windows. Removes a long standing XXX. Should theoretically allow XClientMessage handling on more than one X screen. Alter callers of screen_find to handle failures. --- client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index acc14e6..3d1c085 100644 --- a/client.c +++ b/client.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. * - * $OpenBSD: client.c,v 1.196 2015/06/28 19:54:37 okan Exp $ + * $OpenBSD: client.c,v 1.197 2015/06/30 14:01:43 okan Exp $ */ #include @@ -55,7 +55,8 @@ client_init(Window win, struct screen_ctx *sc) return(NULL); if (sc == NULL) { - sc = screen_find(wattr.root); + if ((sc = screen_find(wattr.root)) == NULL) + return(NULL); mapped = 1; } else { if (wattr.override_redirect || wattr.map_state != IsViewable) -- cgit v1.2.3-2-gb3c3