I decided to investigate this problem and checked out the source code.
After a lot of debugging I found out that the call to focus the wrong
window is coming from compiz CompScreenImpl::focusDefaultWindow which
comes from this code on compiz event.cpp :
else if (event->xfocus.window == privateScreen.rootWindow())
{
/* Don't ever let the focus go to the root
* window except in grab cases
*
* FIXME: There might be a case where we have to
* handle root windows of other screens here, but
* the other window managers should handle that
*/
if (event->xfocus.detail == NotifyDetailNone ||
(event->xfocus.mode == NotifyNormal &&
event->xfocus.detail == NotifyInferior))
{
privateScreen.orphanData.activeWindow = None;
if (event->xfocus.detail == NotifyDetailNone ||
(event->xfocus.mode == NotifyNormal &&
event->xfocus.detail == NotifyInferior))
{
screen->focusDefaultWindow ();
}
}
}
The FIXME comment is very suspicious but I have no idea what would be the
solution.
I'm adding an attachment file with the stacktrace.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1459671
Title:
focus goes to the wrong window after a modal dialog is closed
To manage notifications about this bug go to:
https://bugs.launchpad.net/unity/+bug/1459671/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs