From cc39863363f6c424a1d5f3790ef182b52b69a53e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 6 Jan 2003 04:57:42 +0000 Subject: handle maprequests after mapped correctly. thus making gaim happy again --- src/rootwindow.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/rootwindow.cc') diff --git a/src/rootwindow.cc b/src/rootwindow.cc index 81b19ee1..78017dd3 100644 --- a/src/rootwindow.cc +++ b/src/rootwindow.cc @@ -109,7 +109,20 @@ void OBRootWindow::mapRequestHandler(const XMapRequestEvent &e) printf("MapRequest for 0x%lx\n", e.window); #endif // DEBUG - Openbox::instance->screen(_info->screen())->manageWindow(e.window); + /* + MapRequest events come here even after the window exists instead of going + right to the client window, because of how they are sent and their struct + layout. + */ + OBClient *c = Openbox::instance->findClient(e.window); + + if (c) { + if (c->shaded()) + c->shade(false); + // XXX: uniconify the window + c->focus(); + } else + Openbox::instance->screen(_info->screen())->manageWindow(e.window); } } -- cgit v1.2.3