De-duplicate "actor contains actor" code
Add _st_actor_contains() in st-private for use within St, and monkey-patch in a Clutter.Actor.contains() for use by javascript, and then replace all the duplicate implementations with one or the other of those. https://bugzilla.gnome.org/show_bug.cgi?id=621197
This commit is contained in:
@ -275,16 +275,7 @@ SearchEntry.prototype = {
|
||||
|
||||
_onCapturedEvent: function(actor, event) {
|
||||
let source = event.get_source();
|
||||
let panelEvent = false;
|
||||
|
||||
if (source) {
|
||||
let parent = source;
|
||||
do {
|
||||
if (parent == Main.panel.actor)
|
||||
break;
|
||||
} while ((parent = parent.get_parent()) != null);
|
||||
panelEvent = (parent != null);
|
||||
}
|
||||
let panelEvent = source && Main.panel.actor.contains(source);
|
||||
|
||||
switch (event.type()) {
|
||||
case Clutter.EventType.BUTTON_PRESS:
|
||||
|
Reference in New Issue
Block a user