has moved to a known window.
*/
e->xfocus.window = None;
+
+ no_focus = False; // focusing is back on
}
break;
if (win->isIconic())
win->deiconify(False, False);
if (! win->isStuck() &&
- (win->getWorkspaceNumber() != screen->getCurrentWorkspaceID()))
+ (win->getWorkspaceNumber() != screen->getCurrentWorkspaceID())) {
+ no_focus = True;
screen->changeWorkspaceID(win->getWorkspaceNumber());
+ }
if (win->isVisible() && win->setInputFocus()) {
win->getScreen()->getWorkspace(win->getWorkspaceNumber())->
raiseWindow(win);
}
}
}
+ } else if (e->xclient.message_type ==
+ xatom->getAtom(XAtom::openbox_show_root_menu) ||
+ e->xclient.message_type ==
+ xatom->getAtom(XAtom::openbox_show_workspace_menu)) {
+ // find the screen the mouse is on
+ int x, y;
+ ScreenList::iterator it, end = screenList.end();
+ for (it = screenList.begin(); it != end; ++it) {
+ Window w;
+ int i;
+ unsigned int m;
+ if (XQueryPointer(getXDisplay(), (*it)->getRootWindow(),
+ &w, &w, &x, &y, &i, &i, &m))
+ break;
+ }
+ if (it != end) {
+ if (e->xclient.message_type ==
+ xatom->getAtom(XAtom::openbox_show_root_menu))
+ (*it)->showRootMenu(x, y);
+ else
+ (*it)->showWorkspaceMenu(x, y);
+ }
}
}
XShapeEvent *shape_event = (XShapeEvent *) e;
BlackboxWindow *win = searchWindow(e->xany.window);
- if (win)
+ if (win && shape_event->kind == ShapeBounding)
win->shapeEvent(shape_event);
}
#endif // SHAPE