overview: Only keep ourselves in the overview on button events

This prevents using Control to quickly launch a new instance of
an app in search results or with keyboard navigation.

https://bugzilla.gnome.org/show_bug.cgi?id=695801
This commit is contained in:
Jasper St. Pierre 2013-03-14 11:34:09 -04:00
parent b39e76200a
commit a8c87f3bab

View File

@ -572,8 +572,14 @@ const Overview = new Lang.Class({
return;
let event = Clutter.get_current_event();
if (event && (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0)
return;
if (event) {
let type = event.type();
let button = (type == Clutter.EventType.BUTTON_PRESS ||
type == Clutter.EventType.BUTTON_RELEASE);
let ctrl = (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0;
if (button && ctrl)
return;
}
this._animateNotVisible();