DescriptionFix X11DesktopHandler::ActivateWindow on Unity for known user gestures
Unity in Ubuntu 14.04 ignores X11DesktopHandler::ActivateWindow's
requests to raise Chrome windows by changing _NET_ACTIVE_WINDOW. Instead
it treats it as a _NET_WM_STATE_DEMANDS_ATTENTION and just flashes the
Launcher icon.
This isn't good enough in cases where the activate request was triggered
by a user gesture, for example the user clicked on a push notification.
This patch changes X11DesktopHandler::ActivateWindow to indicate to the
window manager when it is being called from a user gesture (see the
comment added there for more details). And it plumbs the presence of the
user gesture all the way from the content/ layer.
In particular this patch fixes https://crbug.com/470830 on Linux. In
theory the plumbing will be reused when fixing the same issue on Mac.
I tried to make the fix somewhat general, by making ~ScopedBrowserShower
use the user gesture path for any existing navigation with user_gesture
set true in NavigateParams (see chrome/browser/ui/browser_navigator.cc).
Hence the patch also fixed https://crbug.com/489256 (as
chrome::ShowAboutChrome already has user_gesture set to true).
However it wasn't possible to migrate all callers of activate that are
in response to a user gesture (as there are hundreds of callers) - that
will need to be done as follow-up patches, on a case-by-case basis. For
example, this will likely allow https://crbug.com/411702 to be solved
in future.
BUG=470830, 489256, 411702
TEST=manual due to OS dependency, follow steps in https://crbug.com/470830 and https://crbug.com/489256
Patch Set 1 #
Total comments: 1
Messages
Total messages: 5 (1 generated)
|