Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,20 @@ export default class SearchLightExt extends Extension {
this._indicator.set_child(icon);
this._indicator.connectObject(
'button-press-event',
this._toggle_search_light.bind(this),
() => {
// Defer the toggle out of the press gesture's handler: show()
// reparents the entry/search actors and grabs key focus, and doing
// that synchronously while the Clutter press gesture is in flight
// corrupts its state machine on GNOME 48+ (Clutter 18), aborting the
// shell with clutter-gesture.c:set_state assertion (new_state ==
// CLUTTER_GESTURE_STATE_POSSIBLE). idle_add lets the gesture finish
// first (imperceptible, one tick).
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
this._toggle_search_light();
return GLib.SOURCE_REMOVE;
});
return Clutter.EVENT_STOP;
},
this,
);
try {
Expand Down