summaryrefslogtreecommitdiff
path: root/src/rootwindow.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-06 04:57:42 +0000
committerDana Jansens <danakj@orodu.net>2003-01-06 04:57:42 +0000
commitcc39863363f6c424a1d5f3790ef182b52b69a53e (patch)
treee6d7ffda7d7a105d15285a14bd268d3549bb6bc4 /src/rootwindow.cc
parent043822f6b67f0b6cd1cf60eccb1294b13e8bf11a (diff)
handle maprequests after mapped correctly. thus making gaim happy again
Diffstat (limited to 'src/rootwindow.cc')
-rw-r--r--src/rootwindow.cc15
1 files changed, 14 insertions, 1 deletions
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);
}
}