MCPcopy Create free account
hub / github.com/GNOME/gnome-shell / pushModal

Method pushModal

js/ui/modalDialog.js:232–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230 }
231
232 pushModal() {
233 if (this._hasModal)
234 return true;
235
236 const grab = Main.pushModal(this, {actionMode: this._actionMode});
237 this._grab = grab;
238 Main.layoutManager.emit('system-modal-opened');
239
240 this._hasModal = true;
241 if (this._savedKeyFocus) {
242 this._savedKeyFocus.grab_key_focus();
243 this._savedKeyFocus = null;
244 } else {
245 const focus = this._initialKeyFocus || this.dialogLayout.initialKeyFocus;
246 focus.grab_key_focus();
247 }
248
249 if (!this._shellReactive)
250 this.backgroundStack.set_child_below_sibling(this._eventBlocker, null);
251 return true;
252 }
253
254 // This method is like close, but fades the dialog out much slower,
255 // and leaves the lightbox in place. Once in the faded out state,

Callers 14

openMethod · 0.95
openMethod · 0.80
_initMethod · 0.80
_grabEventsMethod · 0.80
_becomeModalMethod · 0.80
_takeModalGrabMethod · 0.80
_initMethod · 0.80
openMethod · 0.80
openMethod · 0.80
_onMenuOpenStateMethod · 0.80
openMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected