gnome-shell/js/ui
Jonas Dreßler 4a6f550acb windowManager: Use new mutter API to freeze window actors ourself
We're currently using the hack of telling mutter that our effect is
completed (even though it isn't) in order to unfreeze updates of the
window actor.

This causes a bug with detecting the wl_outputs a window is
visible on, because the MetaWindowActor emits its "effects-completed"
signal too early, making Mutter update the wl_outputs while we're doing
the animation.

Now since meta_wayland_actor_surface_is_on_logical_monitor() uses the
transformed position and size of the MetaSurfaceActor and is being
called right after we setup the animation (but before it actually
starts, that happens at the next paint cycle) it will use a "very wrong"
rectangle: The transformation has been set to move the actor back to its
old position, and while we did already unfreeze updates and called
clutter_actor_set_position() in meta_window_actor_sync_actor_geometry(),
the actual allocation is not updated yet; this makes
clutter_actor_get_transformed_position() return a position including in
the new transformation, but not including the new allocation, and the
rectangle ends up being moved to the next monitor or completely out of
the stage.

To fix this issue properly, we need to decouple unfreezing actor updates
from emitting the "effects-completed" signal, which is now possible with
the new meta_window_actor_freeze() and meta_window_actor_thaw() APIs. So
use those new methods to freeze and thaw actor updates ourselves and
make sure to call shellwm.completed_size_change() only after the
animation has finished.

Mutter MR: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1250

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/513

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
2020-06-15 13:12:03 +00:00
..
components cleanup: Don't linebreak before closing parentheses 2020-04-28 09:04:49 +00:00
status environment: Add Math.clamp 2020-06-03 12:55:53 -03:00
accessDialog.js js: Don't use templates in files with translations 2020-02-17 23:20:40 +01:00
altTab.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
animation.js animation: Set size through CSS 2020-04-06 11:24:30 -03:00
appDisplay.js appDisplay: Don't fade icons when a folder dialog is open 2020-06-09 16:14:30 -03:00
appFavorites.js appFavorites: Add eog to rename list 2020-05-02 00:16:28 +02:00
audioDeviceSelection.js cleanup: Don't linebreak before closing parentheses 2020-04-28 09:04:49 +00:00
background.js background: Adapt to MetaBackgroundContent 2020-06-09 20:10:52 +00:00
backgroundMenu.js cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
barLevel.js js: Listen to notify::allocation instead of allocation-changed 2020-05-20 15:12:36 +02:00
boxpointer.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
calendar.js messageList: Remove setDate() method 2020-06-06 01:04:09 +02:00
checkBox.js checkbox: Improve accessibility of check boxes for Orca users 2020-03-29 12:56:33 +00:00
closeDialog.js closeDialog: Remove transitions before resetting dialog 2020-03-23 15:27:47 +00:00
ctrlAltTab.js cleanup: Require "dangling" commas 2019-11-11 19:25:14 +00:00
dash.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
dateMenu.js dateMenu: Add "Events" section 2020-06-06 01:04:09 +02:00
dialog.js closeDialog: Make dialog inactive while fading out 2020-02-21 08:11:57 +00:00
dnd.js dnd: Make DND translation-property-aware 2020-02-07 14:43:56 +00:00
edgeDragAction.js cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
endSessionDialog.js js: Promisify async operations 2020-03-31 05:43:40 +00:00
environment.js environment: Add Math.clamp 2020-06-03 12:55:53 -03:00
extensionDownloader.js extensionDownloader: Replace deprecated Soup.SessionAsync 2020-05-14 19:43:56 +00:00
extensionSystem.js extensionSystem: Don't log error name 2020-05-21 21:45:04 +00:00
focusCaretTracker.js cleanup: Prefer template strings 2019-07-05 11:32:31 +00:00
grabHelper.js grabHelper: Add (promised-based) grabAsync() 2019-12-20 15:41:32 +01:00
ibusCandidatePopup.js cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
iconGrid.js iconGrid: Trivial comment cleanup 2020-06-09 16:14:30 -03:00
inhibitShortcutsDialog.js inhibitShortcutsDialog: Adapt to new dialog design 2020-01-27 23:40:04 +01:00
kbdA11yDialog.js ui: Use ClutterSeat for keyboard/pointer a11y 2020-01-30 17:49:08 +00:00
keyboard.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
layout.js js: Listen to notify::allocation instead of allocation-changed 2020-05-20 15:12:36 +02:00
lightbox.js cleanup: Don't linebreak before closing parentheses 2020-04-28 09:04:49 +00:00
locatePointer.js locatePointer: Bind ripples creation to settings 2019-09-09 19:28:18 +00:00
lookingGlass.js lookingGlass: Add actor tree inspector 2020-06-02 12:44:21 -03:00
magnifier.js cleanup: Don't linebreak before closing parentheses 2020-04-28 09:04:49 +00:00
magnifierDBus.js cleanup: Use JSDoc for documentation comments 2019-11-11 19:25:14 +00:00
main.js main: Unset the right prevFocus actor after the focus stack got shifted 2020-04-29 12:40:13 +02:00
messageList.js messageList: Remove setDate() method 2020-06-06 01:04:09 +02:00
messageTray.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
modalDialog.js switcherPopup: Dismiss when a system modal dialog opens 2019-12-06 19:55:39 +01:00
mpris.js calendar: Don't restrict section visibility by date 2020-06-06 01:04:09 +02:00
notificationDaemon.js notificationDaemon: Try harder to find a matching app 2020-06-02 23:17:24 +00:00
osdMonitorLabeler.js cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
osdWindow.js cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
overview.js overview: Adapt to MetaBackgroundContent 2020-06-09 20:10:52 +00:00
overviewControls.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
padOsd.js padOsd: Apply specific CSS to Button/Leader SVG classes 2020-05-29 18:06:48 +00:00
pageIndicators.js pageIndicators: Redesign and add position-based animation 2019-11-23 03:01:51 +05:00
panel.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
panelMenu.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
pointerA11yTimeout.js ui: Use ClutterSeat for keyboard/pointer a11y 2020-01-30 17:49:08 +00:00
pointerWatcher.js cleanup: Stop using Mainloop module 2019-09-12 19:09:24 +02:00
popupMenu.js js: Don't use templates in files with translations 2020-02-17 23:20:40 +01:00
remoteSearch.js js: Promisify async operations 2020-03-31 05:43:40 +00:00
ripples.js cleanup: Require "dangling" commas 2019-11-11 19:25:14 +00:00
runDialog.js js: Don't use templates in files with translations 2020-02-17 23:20:40 +01:00
screencast.js cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
screenShield.js screenShield: Don't inhibit suspend during initial setup 2020-04-24 23:47:31 +00:00
screenshot.js screenshot: Properly clean up if PickColor() is cancelled 2020-05-29 00:52:33 +02:00
scripting.js perf-tool: Spawn perf-tool-helper from gnome-shell 2020-01-27 13:43:06 +00:00
search.js search: Remove usage of allocation flags 2020-05-22 10:18:24 +00:00
sessionMode.js main: Get the theme resource name from sessionMode 2020-03-06 19:09:25 +00:00
shellDBus.js extensionSystem: Add method for opening extension prefs 2020-04-03 15:23:26 +02:00
shellEntry.js shellEntry: Restore natural-height-set instead of forcing it 2020-02-22 16:58:01 +00:00
shellMountOperation.js cleanup: Don't linebreak before closing parentheses 2020-04-28 09:04:49 +00:00
slider.js js: Add missing chain-ups in vfuncs 2020-03-27 10:39:58 +01:00
swipeTracker.js environment: Add Math.clamp 2020-06-03 12:55:53 -03:00
switcherPopup.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
switchMonitor.js switchMonitor: Center align switcher icon's label 2020-01-02 13:03:08 +05:30
unlockDialog.js unlockDialog: Set Switch User Button via _updateUserSwitchVisibility 2020-06-10 23:02:55 +08:00
userWidget.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
viewSelector.js viewSelector: Make sure it's invisible when overview is hidden 2020-06-03 12:55:45 -03:00
windowAttentionHandler.js messageTray: Don't create notification policy on demand 2020-03-26 18:52:10 +00:00
windowManager.js windowManager: Use new mutter API to freeze window actors ourself 2020-06-15 13:12:03 +00:00
windowMenu.js cleanup: Avoid unnecessary parentheses in arrow functions 2019-09-15 16:02:45 +02:00
workspace.js workspace: Center overlay close button on border using guide actor 2020-06-14 21:58:47 +00:00
workspacesView.js workspacesView: Only animate on show() when geometries are already set 2020-06-14 14:44:10 +00:00
workspaceSwitcherPopup.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
workspaceThumbnail.js Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
xdndHandler.js shell/global: Add 'backend' property 2020-04-27 15:18:18 +00:00