gnome-shell/js/ui
Evan Welsh 8fb8f7f827 init: Move Meta main loop into JavaScript after GJS context is initialized
gjs now has an internal mainloop that it can spin to resolve
module imports. That loop uses the thread default context,
so its possible that other sources, namely from mutter, get
dispatched when iterating the context. If that happens before
mutter is properly initialized, this will lead to a crash.

GjsContext needs to iterate its internal mainloop when initializing
to resolve internal modules, to avoid iterating Meta's mainloop and
triggering events before Meta is ready we will initialize the Shell
global and thus the GjsContext (js_context) before Meta.

Once GjsContext is initialized, we can call meta_context_setup().
Once Meta is setup and started, we'll run init.js which uses GJS'
internal promises API to set a "mainloop hook". The mainloop hook
is run immediately after the module returns so GJS will not attempt
to iterate the main loop again before exiting.

Also adjust the 'headlessStart' test to not wait for the
MetaContext::started signal, as that signal has now already
been emitted when the code is executed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6691

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2781>
2023-06-07 19:23:27 +00:00
..
components polkitAgent: Fix closing dialog properly 2023-05-09 19:27:54 +02:00
status backgroundApps: Allow activating apps 2023-06-06 17:16:32 +00:00
accessDialog.js accessDialog: Don't add an empty body 2023-01-17 13:51:54 +00:00
altTab.js altTab: Always include label in thumbnail 2022-10-18 18:04:57 +00:00
animation.js animation: Don't get size information until spinner has a parent 2023-06-07 18:59:43 +00:00
appDisplay.js appDisplay: Avoid using an undefined _swipeTracker 2023-03-19 13:12:22 +00:00
appFavorites.js appFavorite: Add missing .desktop extension for simplescan 2023-03-29 21:51:04 +00:00
appMenu.js js: Queue 'later' via MetaLaters 2022-12-16 22:12:59 +01:00
audioDeviceSelection.js js: Queue 'later' via MetaLaters 2022-12-16 22:12:59 +01:00
background.js Update to drop GTK3 dependency 2023-03-03 20:38:03 +00:00
backgroundMenu.js backgroundMenu: Drop grab-op-begin signal connection 2023-01-30 12:19:22 +00:00
barLevel.js cleanup: Define GObject accessors in camelCase 2021-02-03 20:19:29 +01:00
boxpointer.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
calendar.js style: Clean up calendar widget css 2023-05-18 14:21:29 +00:00
checkBox.js checkbox: Improve accessibility of check boxes for Orca users 2020-03-29 12:56:33 +00:00
closeDialog.js general: Rename "application" to "app" 2023-02-07 14:46:28 +00:00
ctrlAltTab.js cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
dash.js dash: Do not destroy a dash label twice 2023-04-17 20:22:12 +00:00
dateMenu.js dateMenu: Use desktop action to open Evolution calendar 2023-02-12 20:14:02 +00:00
dialog.js js: Queue 'later' via MetaLaters 2022-12-16 22:12:59 +01:00
dnd.js dnd: Don't leak a signal connection 2023-05-19 20:33:55 +02:00
edgeDragAction.js edgeDragAction: Drop grab-op-begin signal connection 2023-01-30 12:19:22 +00:00
endSessionDialog.js endSessionDialog: Catch async errors 2023-03-19 19:54:45 +00:00
environment.js build: Remove Soup2 support 2023-05-26 19:05:22 +00:00
extensionDownloader.js extensionDownloader: Check schemadir existence and type 2023-03-27 21:12:59 +00:00
extensionSystem.js extensionSystem: Support stylesheet variants 2023-05-26 18:30:39 +02:00
focusCaretTracker.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00
grabHelper.js Require both mouse and keyboard grabs for some grabs to be successful 2022-05-04 17:28:08 +00:00
ibusCandidatePopup.js ibusCandidatePopup: Prevent it from covering screenshot UI 2022-07-04 13:38:15 +00:00
iconGrid.js iconGrid: Delay updating adjustment value on page switch 2023-03-04 16:34:47 +01:00
inhibitShortcutsDialog.js inhibitShortcutsDialog: Stop using GTK to display shortcut 2023-03-06 15:08:56 +00:00
init.js init: Move Meta main loop into JavaScript after GJS context is initialized 2023-06-07 19:23:27 +00:00
kbdA11yDialog.js kbdA11yDialog: Use MetaKeyboardA11yFlags 2022-06-16 09:38:20 +00:00
keyboard.js keyboard: Change osk menu entry to control-center keyboard pane 2022-11-24 13:49:55 +01:00
layout.js layout: Add work-around for testing greeter UI in nested 2023-02-09 19:59:12 +01:00
lightbox.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
locatePointer.js locatePointer: Bind ripples creation to settings 2019-09-09 19:28:18 +00:00
lookingGlass.js js: Queue 'later' via MetaLaters 2022-12-16 22:12:59 +01:00
magnifier.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00
main.js main: Consider color-scheme setting for default stylesheet 2023-05-25 17:10:53 +02:00
messageList.js messageList: Only close messages via delete key if they can be closed 2022-06-04 15:23:45 +02:00
messageTray.js messageTray: Don't set _notificationRemoved if destroyed notification is queued 2023-04-17 19:40:45 +00:00
modalDialog.js modalDialog: Fix fading out dialog 2023-03-19 19:54:45 +00:00
mpris.js mpris: Fall back to app icon first 2023-05-15 16:05:31 +00:00
notificationDaemon.js general: Rename "application" to "app" 2023-02-07 14:46:28 +00:00
osdMonitorLabeler.js js: Get monitor manager from backend 2022-12-16 22:12:59 +01:00
osdWindow.js osdWindow: Implement new OSD design 2022-02-12 15:28:52 +00:00
overview.js overview: Provide public access for search provider registration 2023-06-01 15:54:59 -07:00
overviewControls.js overview: Provide public access for search provider registration 2023-06-01 15:54:59 -07:00
padOsd.js general: Rename "application" to "app" 2023-02-07 14:46:28 +00:00
pageIndicators.js cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
panel.js panel: Refactor quick settings loading for asynchronous imports 2023-06-07 18:59:43 +00:00
panelMenu.js panelMenu: Fix keynav of menu-less buttons 2023-04-17 20:09:56 +00:00
pointerA11yTimeout.js ui: Use ClutterSeat for keyboard/pointer a11y 2020-01-30 17:49:08 +00:00
pointerWatcher.js js: Get idle monitor from backend 2021-05-18 13:42:52 +00:00
popupMenu.js popupMenu: Replace ornament unicode with icons 2023-05-17 17:41:10 +00:00
quickSettings.js quickSettings: Fix icon-name construct property in menu toggles 2023-03-27 14:52:50 +00:00
remoteSearch.js search: Stop special-casing GNOME Settings on search 2022-12-15 19:02:02 +00:00
ripples.js cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
runDialog.js runDialog: Use single quotes for Wayland restart warning 2022-05-31 18:35:41 +00:00
screenShield.js general: Rename "application" to "app" 2023-02-07 14:46:28 +00:00
screenshot.js screenshot: Remove leftover code in property getter 2023-04-26 19:31:53 +02:00
scripting.js scripting: Make helper proxy initialization async 2023-06-07 11:12:40 +00:00
search.js search: Expand search results view 2023-04-21 01:08:23 +02:00
searchController.js overview: Provide public access for search provider registration 2023-06-01 15:54:59 -07:00
sessionMode.js main: Consider color-scheme setting for default stylesheet 2023-05-25 17:10:53 +02:00
shellDBus.js general: Rename "application" to "app" 2023-02-07 14:46:28 +00:00
shellEntry.js shellEntry: Remove unused variable 2022-10-14 22:32:30 +00:00
shellMountOperation.js shellMountOperation: Don't read unavailable desktop file 2023-02-02 19:33:10 +01:00
slider.js slider: Use Clutter.grab() for implicit grab 2022-01-29 01:16:29 +01:00
swipeTracker.js swipeTracker: Drop grab-op-begin signal connection 2023-01-30 12:19:22 +00:00
switcherPopup.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
switchMonitor.js js: Get monitor manager from backend 2022-12-16 22:12:59 +01:00
unlockDialog.js lockscreen: Style cleanup for lock and login 2023-01-06 11:29:31 +00:00
userWidget.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
welcomeDialog.js cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
windowAttentionHandler.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
windowManager.js Remove keyboard shortcut to open the app menu in the panel 2023-04-26 14:32:23 +02:00
windowMenu.js panel,windowMenu: Update to meta_window_begin_grab_op() API change 2023-01-30 12:19:22 +00:00
windowPreview.js dnd: Add addClickAction() method 2023-04-25 09:01:16 +00:00
workspace.js workspace: Port WorkspaceBackground allocate to C 2022-08-03 12:30:31 +00:00
workspaceAnimation.js workspaceAnimation: Get time outside of the animation-complete callback 2022-03-13 00:06:03 +00:00
workspacesView.js workspacesView: Update visibility after updating workspaces 2023-03-21 12:02:52 +00:00
workspaceSwitcherPopup.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
workspaceThumbnail.js workspaceThumbnail: Use click action 2023-04-25 09:01:16 +00:00
xdndHandler.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00