Let Chrome Windows Opened by a Keyboard Shortcut Steal Focus in Ubuntu

I recall that this configuration has been necessary with Ubuntu+Unity+Compiz for years. I just had to figure it out again, so I want to document the solution.

Install CompizConfig Settings Manager, then run it.

sudo apt-get install compizconfig-settings-manager
compizconfig-settings-manager

Then click General Options then Focus & Raise Behavior then click the + icon next to Focus Prevention Windows and set the following:

Type Window Class
Value google-chrome
Relation And
Invert Checked

Click Add, and you’re done. Your Focus Prevention Windows field now looks something like

!(class=Polkit-gnome-authentication-agent-1) & !(class=google-chrome)

Source: Issue 27348 – chromium – New window does not become active if opened from taskbar while another app is active – An open-source project to help move the web forward. – Google Project Hosting

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>