Enable map request event processing

Also replaces XMapRaised by xcb equivalent.
This commit is contained in:
Martin Gräßlin 2013-07-26 11:02:44 +02:00
parent f70208c7c4
commit c863029b8d

View file

@ -235,11 +235,11 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
case XCB_DESTROY_NOTIFY: { case XCB_DESTROY_NOTIFY: {
return false; return false;
} }
#if KWIN_QT5_PORTING case XCB_MAP_REQUEST: {
case MapRequest: {
updateXTime(); updateXTime();
if (Client* c = findClient(WindowMatchPredicate(e->xmaprequest.window))) { const auto *event = reinterpret_cast<xcb_map_request_event_t*>(e);
if (Client* c = findClient(WindowMatchPredicate(event->window))) {
// e->xmaprequest.window is different from e->xany.window // e->xmaprequest.window is different from e->xany.window
// TODO this shouldn't be necessary now // TODO this shouldn't be necessary now
c->windowEvent(e); c->windowEvent(e);
@ -252,11 +252,15 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
// children of WindowWrapper (=clients), the check is AFAIK useless anyway // children of WindowWrapper (=clients), the check is AFAIK useless anyway
// NOTICE: The save-set support in Client::mapRequestEvent() actually requires that // NOTICE: The save-set support in Client::mapRequestEvent() actually requires that
// this code doesn't check the parent to be root. // this code doesn't check the parent to be root.
if (!createClient(e->xmaprequest.window, false)) if (!createClient(event->window, false)) {
XMapRaised(display(), e->xmaprequest.window); xcb_map_window(connection(), event->window);
const uint32_t values[] = { XCB_STACK_MODE_ABOVE };
xcb_configure_window(connection(), event->window, XCB_CONFIG_WINDOW_STACK_MODE, values);
}
} }
return true; return true;
} }
#if KWIN_QT5_PORTING
case MapNotify: { case MapNotify: {
if (e->xmap.override_redirect) { if (e->xmap.override_redirect) {
Unmanaged* c = findUnmanaged(WindowMatchPredicate(e->xmap.window)); Unmanaged* c = findUnmanaged(WindowMatchPredicate(e->xmap.window));