Commit 4cda61a1 added support for pre-authenticated logins in
oVirt environments. This feature prevents a user from having
to type their password twice (once to the oVirt management machine,
and then immediately again in the provisioned guest running gnome-shell).
That feature is currently oVirt specific, but a similar feature would
be useful in non-oVirt based virt farm environments.
Toward that end, this commit generalizes the various aspects of the
oVirt integration code, so that it can be reused in a subsequent
commit for adding single sign on support in vmware deployments, too.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1983
ClutterActor provides the same function, but with a different return
value. So since we already switched to the ClutterActor implementation
in our C code, we can now safely remove st_widget_get_resource_scale()
and update the JS code that's still using the old API.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
The blur effect needs to take the scale-factor into account, so we
listen for scale changes. However we set up the signal handler when
creating a background, which is repeated for each monitor, and every
time the monitor configuration changes. But we only disconnect the
last handler that was connected, and only when we are destroyed,
not when recreating backgrounds.
Fix this by splitting out updating the effect parameters to a separate
method that iterates over all backgrounds, so we can simply set up the
handler from the constructor.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1341
The arrow of the removed app was still left in the list with the
visibility of the arrow still depending on the original list order. This
could either lead to apps with just one window now suddenly having a
down arrow or apps with multiple windows not having one. If the last
window in the list had a down arrow, it would have been displayed
outside the window switcher.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2935https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1340
As usually with GObject setters, we should check whether the property
actually changed before setting the value and notifying the property. So
check whether the title or description text actually changed before
setting it.
This fixes a bug which makes the title flicker and change its size,
because when updating the title we remove the "leightweight" css class
and reapply it inside a later, which makes the title appear larger for
one frame.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2574https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
Noticed while working on customizable folders. Calling GrabHelper.ungrab()
ends up calling FolderDialog.popdown(), but at this point the '_isOpen'
field isn't updated yet, so we end up calling popdown() twice.
Update the '_isOpen' field before ungrabbing.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
Overview has signals to notify about starting, cancelling, and
finishing icon drags, but none of these signals pass the dragged
item to the callbacks.
Pass the dragged items to the 'item-drag-*' overview signals.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
Commit c7e597cf72 tried to improve the slide animations when entering
the overview by using the same time as the overall overview animation,
but in fact broke the animation most of the times.
That is because the Overview imports OverviewControls before defining
the ANIMATION_TIME variable, so any javascript code that is evaluated
during that import will see the value as "undefined" (which is converted
to 0 for the animation).
Fix this by moving the ANIMATION_TIME variable before the imports instead
of the usual placement.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1331
When you tap Super and see the sidebars and windows slide, it looks more
cohesive if those animations complete at the same time.
Previously there were 0.09 seconds difference between the two animations
which was enough to make it look slightly buggy. Now it doesn't.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1289
We now found the underlying bug: The ControlsManager (which causes the
bad call to `_updateWorkspacesFullGeometry()`) is getting (re-)allocated
while we add the view to the overviewGroup actor because the
overviewGroup is already visible and the view is immediately getting
mapped by `clutter_actor_add_child_internal()`. That causes a
resource-scale calculation and that indirectly causes a call to
`_clutter_stage_maybe_relayout()` (explained more detailed in the last
commit).
So now that we got rid of the immediate relayout happening when mapping
the view, we can revert this fix.
This reverts commit 6cc19ee6f0.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1315
When the bounding box size is 0 during allocation (which happens right
after creating a window for example), we're doing a division by zero and
end up with a NaN scale. This ends up making the childBox NaN, which
triggers an error in Clutters allocation machinery.
So fix that and fall back to a scale of 1 in case the bounding box is
empty.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1320
The current microphone indicator only indicates if the microphone is in
use. Users might be also interested if their microphone is recording
or is muted, this commit enables that without opening the pop-up
menu. The microphone icon changes itself, depending on the sensitivity
of the microphone. It behaves similar to the already existing volume
indicator.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2902
In the past, the icon grid would update the number of pages
during the call to adaptToSize(). However, after the new grid
layout landed, the number of pages is updated by the time an
item is added or removed.
Instead of comparing the old and new number of pages in the
icon grid, compare the pages shown by the indicator, and the
grid pages.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
Now that we don't have the Frequent tab anymore, and subsequently
the buttons to switch tabs, the app grid fill all the way to the
bottom, leaving no room for drag overshoot.
Add a 20px (i.e. OVERSHOOT_THRESHOLD) area at the bottom of the
grid where dragging actually scrolls to the next page.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
The two BaseAppView subclasses now share a lot in terms of
widgetry: they both have a scroll view, pagination dots, swipe
management, etc.
Move this shared code into BaseAppView. Notice, however, that
BaseAppView only creates the widgetry, but it doesn't add them
to any specific layout. FolderView arranges the widgetry in a
vertical box, while AppDisplay arranges it in a ShellStack.
Add a new 'orientation' parameter to BaseAppView and use it
to determine the orientation of the pagination dots, the swipe
tracker direction, and the scroll event handling.
It is worth noticing that the scroll event is a bit more
sophisticated now: when the orientation is horizontal, it
handles all directions since mice wheels usually only generate
up/down events.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
When FolderIcon is destroyed, it destroyed the FolderView and, if
there's a folder dialog present, it destroys the dialog as well.
Turns out, the folder dialog adds the icon's FolderView to itself.
The view becomes part of the dialog's actor tree. When the dialog
is destroyed, it also tries to destroy the view - but the folder
view was already destroyed by FolderIcon!
Fix that by letting the dialog destroy the folder view if it exists,
otherwise destroy the folder view directly.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
Add app icons to the exact page and position they're located
instead of always appending. This will be useful later when
custom icon positions are in place.
For now, it assumes pages are always filled, which is true,
but this will also change with custom icon positions.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
AppDisplay currently adds all icons, and hides the ones inside
a folder. Change that to only add the icons that are not inside
folders. Adding an icon to a folder removes the icon from the
main grid.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
When filtering out the app icons, AppDisplay calls FolderIcon.getAppIds(),
which then calls FolderView.getAllItems(). This last function reads the
already added app icons inside the given folder, and return their app ids.
So far, so good.
When the GSettings backing a folder changes, FolderIcon emits 'apps-changed'
to notify AppDisplay that the folder changed.
Cool.
When AppDisplay receives this signal, it first recreates its own icons, then
updates the folders, and finally hides the icons that are inside folders.
This series of events is unfortunate. Future patches will need the folder
to be updated *before* AppDisplay updates its own icons.
Update folder icons before chaining up to BaseAppView._redisplay().
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
The icon grid is always paginated, so the app grid code doesn't need
to behave differently in the FolderView and AppDisplay.
Move the keyboard handling to IconGrid itself, and remove the now dead
code from AppDisplay.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
The new icon grid layout operates based on rows and columns, and
doesn't try to dynamically adapt it to fit to the container. In
this case, it is better to have a pre-defined set of well-known,
well-tested rows and columns, and switch between them based on
the aspect ratio of the screen.
Introduce a set of modes to the icon grid, and select the mode
that is closest to the aspect ratio.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
IconGridLayout is a new layout manager that aims to replace the
current paginated layout algorithm implemented by the icon grid.
There are a few outstanding aspects of this new layout manager
that are worth highlighting. IconGridLayout implements all the
mechanisms necessary for a paginated icon grid, but doesn't
implement any policies around it. The reason behind this decision
is that this layout manager will be used by other places (e.g.
the login dialog) that demand different policies to how the
grid should look like.
Another important aspect of this grid is that it does not queue
any relayouts when changing its properties. If a relayout is
required, the actor should manually queue it. This is necessary
to avoid layout loops.
Add the IconGridLayout class. Next commits will do the surgery
to IconGrid and any related code to use this new layout manager.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
For drag actors which get reparented to the uiGroup, we currently wait
until the next input event to set the fixed position of the actor, until
that they will just be allocated their old fixed position, which is 0,
0.
So avoid drag actors flickering at the top left for one frame and
position them correctly right after reparenting.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
Properly adjust for drag actors which were allocated using a custom
vfunc_allocate() and might not have gotten allocated their preferred
size. When DND reparents the actor to the uiGroup, the drag actor will
get allocated its preferred size, so we also need to take the difference
between the old allocation size and the preferred size into account
before reparenting to the uiGroup.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
Properly handle drag actors which are not allocated using a fixed
position and disable the fixed position we were using to move the actor
around before we reparent it again to its original parent.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
The workspace.js file is quite large and is a bit confusing when it
comes to the term "window" in there, because it can either refer to a
WindowPreview of a complete window or to an individual window like an
attached dialog.
So try to avoid that confusion and split the new WindowPreview class and
its WindowPreviewLayout layout manager out into a new windowPreview.js
file.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
MetaWindow is Mutters representation of a window and provides all the
APIs about it, MetaWindowActor is just the ClutterActor that's drawing
that window. So use a MetaWindow to create a WindowPreview instead of
the window actor.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
We want to stop using the MetaWindowActor for things which are actually
related to the MetaWindow, one more thing where we can change that is
the overviewHint, which is currently added to the MetaWindowActor.
So move that hint to the MetaWindow and stop calling
get_compositor_private() in a few more places.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
We can simply get the MetaWindowActor by calling
MetaWindow.get_compositor_private(), so stop accessing the realWindow
property of WindowPreview. For this we also have to make _isMyWindow()
and _isOverviewWindow() take a MetaWindow as an argument instead of a
MetaWindowActor.
Since the WorkspacesThumbnails are also drop targets for WindowPreviews
and their WindowClones also have the public metaWindow property, switch
to using the metaWindow property there, too.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
Since the WindowPreview class rarely needs to handle the actual actor
painting the window preview, refactor the WindowPreviewLayout a bit to
only pass a MetaWindow to its addWindow() and removeWindow() functions.
Also make the getWindows() function return an array of MetaWindows,
which makes the getMetaWindow() function obsolete, so remove that.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
We're going to remove ClutterClones, so call the parameters to
addWindow() and removeWindow() "actor" instead of "clone". Also make the
destroyIds less confusing and rename the actual actor destroy id to
"destroyId", and rename the window actors destroy id to
"windowActorDestroyId".
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
Since ClutterClones are going to be removed, let's switch the
terminology here to something that's more understandable and rename the
WindowClone class and its layout manager to
WindowPreview/WindowPreviewLayout.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
Now that we properly notify mutter about when a size-change animation
has ended, it should never happen that a new size-change animation is
started without the last one being cancelled (ie. 'kill-window-effects'
being emitted).
This means there should also never be an old animationInfo attached to a
window actor, so warn in case we still find one when starting the
animation.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
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/513https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
It might be that we receive a "kill-window-effects" signal between the
emission of the "size-change" and the "size-changed" signal.
In this case we already have the animationInfo attached to the window
actor, so we should also remove it.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
Using CSS to center the title actor on the border is a bit ugly, because
it requires the CSS to match the calculations used in chromeHeights().
Also it is not possible to use CSS margins for cases where the position
of the actor is determined at run time, such as for the close button.
Instead use an invisible actor that spans between the horizontal and
vertical center lines of the border as guide when aligning the title
actor.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1313
Commit 1ea22a5281 broke the window reposition animation when it
based the ::size-changed signal on the layout manager's bounding box
instead of the MetaWindow::size-changed signal.
That's happening because of the combination of:
1. we adjust to window size changes immediately without animations
2. closing a window triggers a change to a 0x0 bounding box which
is not treated as a size change
Fix this by addressing the 2nd factor, and don't treat a change to
a 0x0 bounding box as size change.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2901
Animating the window clones of the overview requires the fullGeometry
and the actualGeometry to be set, which they won't be when showing the
overview for the first time. So don't even try to animate the window
clones in that case because the geometries will still be null and
accessing them in workspace.js will throw errors.
The workspace views will still get the correct layout as soon as the
allocations happen because syncing the geometries will trigger updating
the window positions. Since animations are disabled for position changes
when syncing the geometry though, we won't get an animation and the
clones will jump into place. That's not a regression though since before
this change we also didn't animate in that case because the geometries
used were simply wrong (the actualGeometry was 0-sized as explained in
the last commit).
If we wanted to fix the initial animation of the overview, we'd have to
always enable animations of the window clones when syncing geometries,
but that would break the animation of the workspace when hovering the
workspaceThumbnail slider, because right now those animations are "glued
together" using the actualGeometry, so they would get out of sync.
The reason there are no errors happening in workspace.js with the
existing code is that due to a bug in Clutter the fullGeometry of
WorkspacesDisplay gets set very early while mapping the WorkspacesViews
(because the overviews ControlsManager gets an allocation during the
resource scale calculation of a ClutterClone, see
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1181), so it
won't be set to null anymore when calling
WorkspacesView.animateToOverview().
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1119
The fullGeometry and the actualGeometry of the WorkspacesDisplay are set
from the allocation of the overviews ControlsManager and the
WorkspacesDisplay, that means they're only valid after those actors got
their allocations during Clutters allocation cycle.
Since WorkspacesDisplay._updateWorkspacesViews() is already called while
showing/mapping the WorkspacesDisplay, that allocation cycle didn't
happen yet and we end up either setting the geometries of the views to
null (in case of the fullGeometry) or to something wrong (a 0-sized
allocation in case of the actualGeometry).
So avoid setting invalid geometries on the views by initializing both
the fullGeometry and the actualGeometry to null, and then only updating
the geometries of the views after they're set to a correct value.
Note that this means we won't correctly animate the overview the first
time we open it since the animation depends on the geometries being set,
but is being started from show(), which means no allocations have
happened yet. In practice this introduces no regression though since
before this change we simply used incorrect geometries (see the 0-sized
allocation mentioned above) on the initial opening and the animation
didn't work either.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1119
Start using the new overlays we introduced in the last commit and remove
the WindowOverlay class and the objects for keeping track of them in the
Workspace.
The new layout which doesn't use the -shell-close-overlap CSS property
anymore sligthly changes the position of the close button to be a bit
further away from the actual window.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
So far we allowed the titles of window overlays to expand their width to
be larger than the actual WindowClone, they could expand to the full
size of the Workspace.
Since we're now going to implement those titles as part of the
WindowClone itself, having this feature is no longer possible as easily
as it was before. That's because the clones are stacked according to the
stacking of the actual windows, and since the overlay-elements are
attached to those clones, they will also be shown underneath other
clones.
So stop allowing the titles to expand and limit their size to the width
of the clone, which makes sure titles never get shown above or
underneath other clones.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
Add the window overlays we're currently showing using the WindowOverlay
class to the WindowClone class and implement them using
ClutterConstraints instead of the old fixed position/size layout, which
had to be used because the workspaces were scaled, and the title and app
icon were kept unscaled using a separate layer.
Specifically, this is done by adding the ClutterClones to a static
container owned by the WindowClone and adding the elements of the
overlay as children to the WindowClone itself. That way the
overlay-elements can use the container as a source for their constraints
and we avoid having to make sure the overlays remain visible above the
ClutterClones.
We're not using the new overlays yet, they're hidden by default and
showOverlay() isn't called anywhere yet.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
Now that we have a new API to get all the windows and metaWindows from
our layout manager, implement the deleteAll() method of the window clone
using that API instead of looping through the children of the actor and
using the source of the ClutterClone.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
Now that the folder dialog covers the whole primary
monitor, it eats all input events, and doesn't allow
the event blocker to detect clicks.
Move the click action to the folder dialog itself, and
popdown the dialog if a click is triggered on the dialog
(but not on any children).
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
Future commits will improve input handling of the folder
dialog, and they'll require the dialog to cover the whole
primary monitor.
Add another internal, center-aligned container to the
folder dialog, and make it cover the whole available area.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
Right now, the app folder dialog isn't really a dialog,
since it is actually added to the AppDisplay. Furthermore,
having it added in AppDisplay may mess up with its sizing
calculations, since AppDisplay has a ClutterBinLayout and
the folder dialog has a fairly large minimum size.
Add the folder dialog to the overview group. Next commits
will adjust various actors to be able to better handle it.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
Events have a clear and obvious connection to the calendar, and similar
to the Clocks and Weather sections there's a strong link to a particular
application.
Adding them as another section to the right-hand side of the calendar
therefore presents a viable alternative to the old events section.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
The idea behind hiding the notifications and media section on days
other than today was that they represent present activity together
with today's events, in contrast to past and future events from
other days.
After events were moved out of the message list, that behavior is
no longer useful: We just guarantee that the left-hand side of the
calendar will always be empty when browsing the calendar.
Adjust to that by removing the limitation by date.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
While treating notifications as a type of present event was a neat
concept, there are some issues with it that we never managed to
address (not least the inability to "open" an event).
So remove the current events section from the message list; we'll
bring back events in a different form later.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
This comment is no longer correct, we're not inserting any actors here
to adjust for the window border, but we're modifying the allocation of
the children to adjust for that border.
Since that happens in the layout manager anyway, remove the comment
here.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
Now that we handle all ClutterClones belonging to the WindowClone pretty
much the same, we can add a generic _addWindow function to WindowClone
which creates the ClutterClone and adds it to the layout manager.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
This isn't quite the same as the allocation, but it's what the workspace
actually wants to use given that we use the bounding box of the
WindowClone for all the layout calculation.
So instead of calculating the windowCenter in the WindowClone, make use
of the bounding-box property of the layout manager and return the center
point of that.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
Make use of the new bounding-box property we introduced for the
WindowClones layout manager in the last commit.
With this we can remove all the bounding box calculation code from the
WindowClone class and simply use the "notify::bounding-box" signal to
notify changes to our size. To make sure users of the WindowClone don't
break, we now have to convert the layout managers ClutterActorBox in our
getter function to a JS object.
Since we now also don't have to connect to the "destroy" signal of the
attached dialogs anymore, we can remove _disconnectSignals() and only
listen to "destroy" of the toplevel window.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
Move the tracking of the bounding box and all the layout related things
out of the WindowClone class and into the layout manager. This allows
the layout manager to keep track of its windows itself and simply notify
the new bounding-box property in case that box changes.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297