Commit Graph

7109 Commits

Author SHA1 Message Date
Florian Müllner
9e8883c922 workspacesView: Do not skip entire overview transition
Since commit af543daf1c, we skip the overview transition when the
actual geometry hasn't been set yet. However with the new layout
manager, the only bit that still needs the separate geometry is
the transition of the view, the workspaces can do their transition
just fine.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:42 +00:00
Georges Basile Stavracas Neto
0893789b34 workspacesView: Update visibily when gesture drag begins
When dragging the workspaces through the swipe gesture, all
workspaces must be visible. WorkspacesView's _updateVisibility()
method special-cases this and ensures that.

However, this method is only called when (1) going to the active
workspace, and (2) when the gesture ends. That means, if there
is any workspace hidden by the time a gesture starts, it is never
shown!

Call _updateVisibility() on startTouchGesture() as well.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1360
2020-07-10 11:14:12 -03:00
Daniel van Vugt
9363fd3524 workspaceSwitcherPopup: Set offscreen redirect always
Because for most frames during a workspace switch it's not changing and
we can repaint it faster if it's cached on the GPU as a single texture.

This seems to reduce the render time for workspace switching by more
than 20%.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1356
2020-07-09 11:49:59 +08:00
Jonas Dreßler
06df79286d windowPreview: Adapt to ClutterActor API changes
The API of clutter_actor_allocate_preferred_size() changed with
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1310, so adapt to
this change and pass the origin to the function.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1322
2020-07-07 16:51:33 +00:00
Florian Müllner
9297d87775 workspacesView: Do not animate primary view geometry when fading
When going straight to the app picker, we fade in the overview instead
of doing the full-blown zoom transition. In order to keep windows at
their floating position, we must apply the same to the view itself
and not transition to the overview geometry when fading.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
Florian Müllner
ef56b14553 workspacesView: Always sync geometry after showing overview
We don't always want to sync the geometry when entering the overview,
namely when the fade transition is used.

However we do want the correct geometry once we have entered the overview,
so that workspaces are at their place when switching from the app picker.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
Florian Müllner
30ff76272e workspacesView: Decouple syncing geometry from updating views
This gives us more control over when the geometry is synced. We
will soon use that to keep the primary view at the work area
geometry while fading to the overview.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
Florian Müllner
52a7481ba6 workspacesView: Only animate primary view
Non-primary views always use their monitor's work area for their
geometry, so there's nothing to animate when leaving the overview.

The animation is already limited to the primary view when entering
the overview, so this is also more consistent.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
Florian Müllner
14cfd74f08 workspace: Always start in FLOATING state
It doesn't matter which animation we use to enter the overview,
we always want to start and end with the floating layout.

The simplest way to achieve that is by creating the state adjustment
with the correct value in the first place.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
Georges Basile Stavracas Neto
fa97f7141b workspace: Remove reserved slots
This is a pre-3.0 feature that was dropped before
the 3.0 release, but managed to find its way until
now, 11 years later.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1352
2020-07-07 12:26:59 +02:00
Florian Müllner
03bcd4c05b unlockDialog: Small cleanup
It's silly to initialize a variable to 0 right before setting it
to its actual value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1352
2020-07-07 12:26:58 +02:00
Jonas Dreßler
89574abc83 windowPreview: Remove slotId property
We're no longer using that property, so clean up a bit and remove the
last occurences of it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1351
2020-07-07 11:22:20 +02:00
Florian Müllner
602078cbde workspacesView: Add back overview transition
The transition was temporarily removed when switching to the new
workspace layout manager. Now everything is in place to reimplement
it with a combination of the layout manager's state adjustment and
the view's allocation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:09:29 +02:00
Florian Müllner
96f63b08c2 workspacesView: Properly allocate workspaces
So far we've been allocating workspaces in a stack, and relied on
translation to move them to the right position. And as the position
depends on both the workspace's index and the view's viewport, some
care is needed to prevent gestures/scrolling from interfering with
layout updates.

Clean that up by properly allocating workspaces in a row or column,
and use a translation to reflect the current scroll position.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
d66cd0d206 workspacesView: Don't set full geometry
It's not used anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
ff13ad9e71 workspacesView: Stop using full geometry
Since the workspaces themselves stopped using it, there is little
reason for upholding the difference between "full" and "actual"
geometry.

Just base positioning/swiping on the view's allocation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
5e4b65d37e workspacesView: Use work area for default geometry
The workspace's layout manager keeps the workspace at the same ratio as
the work area, so it makes more sense to base the views' default geometry
on that as well than the monitor area we are using right now.

(It shouldn't matter much in practice, as this only affects views on
non-primary monitors where the work area usually matches the monitor area)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
51fd0875d1 workspacesView: Simplify syncing actual geometry
We adjust the size and position of the primary view to match the workspaces
display, but views on other monitors are always set to fill their monitor.

Take that into account and create views with a fixed size and position, then
only sync the primary view to the new geometry.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
75f8903c7e workspace: Use actual container allocation
We currently assume that the passed in Clutter.ActorBox matches
the container allocation, but in reality it is the container's
content area.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
124eb1ca18 workspace: Account for window picker padding
Workspaces are supposed to request the work area as their preferred
size, however the widget will adjust the sizes returned by the
layout manager to account for borders and padding.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
b5d925817f workspace: Disable preview overlays unless fully zoomed out
The overlays are only meant to be shown when the workspace is fully
zoomed out, not when using the floating layout or some in-between state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
Florian Müllner
c134091268 windowPreview: Allow to disable overlay
WindowPreviews now contain and manage overlaid elements like close
button or title label themselves. That's generally better, but right now
the only way to disable those overlays (for example during transitions)
is to prevent any hover or focus events from getting to the preview.

Instead, add some explicit API for enabling or disabling overlay support.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:49 +02:00
Florian Müllner
ff89693998 workspace: Handle minimized windows in layout
The new layout manager always uses the window's regular size and position
for the floating state, but the preview of minimized windows should be
hidden instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:05:36 +02:00
Jonas Dreßler
c26860dcb7 windowPreview: Ensure style as soon as preview is realized
For the windowPreview we need to ensure the style information of the
border and title is up-to-date when chromeWidths() or chromeHeights() is
called. Since the introduction of the WorkspaceLayout those functions
may be called during an allocation cycle, which means we should avoid
calling queuing relayouts inside them. Calling StWidgets ensure_style()
method will queue a relayout though in case the newly generated theme
node has a different geometry.

So avoid queueing a relayout during allocation cycles (and the warning
Clutter logs because of that) by ensuring the style of the border and
title earlier, as soon as the WindowPreview is attached to a stage.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
Jonas Dreßler
6757c7d20a workspace: Animate opening new windows while in overview
Use the pivot point and scale to animate in new windows which are opened
while the overview is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
Jonas Dreßler
751189253a workspace: Use the new WorkspaceLayout for allocating window clones
Switch to the new WorkspaceLayout layout manager to allocate the window
clones of the overview properly using Clutters layouting mechanisms.

Since we now no longer make use of the fullGeometry, we can remove the
setFullGeometry() function from the Workspace class. Also we can stop
setting the actualGeometry on the Workspaces and WorkspaceViews and
instead just set the fixed position and size of the views to their
full or actual geometry. This also has the benefit that we no longer
have to set a custom clip, but can simply enable clip_to_allocation.

The geometry needs to be set inside a BEFORE_REDRAW later because
_updateWorkspacesActualGeometry() is called from a notify::allocation
handler.

This isn't doing any animations when showing/hiding the overview yet,
we'll add that in the next commit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
Jonas Dreßler
21187a4cec workspace: Introduce layout manager for allocating the Workspace
Add a new ClutterLayoutManager for layouting the workspaces of the
overview, WorkspaceLayout.

This layout manager integrates the existing LayoutStrategies used to
layout the window clones of the overview and supports freezing the
layout, animating between layout changes and adjusting the spacing for
the width and height of the window chrome. It also adds support for a
layout of the windows that looks the same as the actual workspace,
transitioning between that layout and the LayoutStrategy can be done by
setting the value of an StAdjustment, available using the
stateAdjustment getter function.

This will replace the current static-positioning based layouting of the
window clones in the next commit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
Jonas Dreßler
b7db56ca9b workspacesViews: Use translation for showing Workspaces
We're going to use fixed position for positioning workspaces when
they're allocated by their own layout manager, using those positions to
scroll between different workspaces interferes with that, so do that
using translations instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
Florian Müllner
261d36ba72 keyboard: Request a bigger size in portrait orientation
In portrait orientation, we set the height to the preferred height
for the monitor width (or, if smaller, a third o the screen height).

However as the forWidth currently doesn't make a difference, the height
is effectively controlled by the natural height of the keys - which is
rather small.

Address this by making AspectContainer request an appropriate preferred
size based on the fixed ratio.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349
2020-07-06 15:16:35 +00:00
Florian Müllner
1e72874192 keyboard: Fix setting height in portrait orientation
get_preferred_height() returns both the minimum and natural height,
not a single size. Math.min() doesn't handle that and returns NaN,
whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349
2020-07-06 15:16:35 +00:00
Daniel van Vugt
75235624b2 background: Use actor.content.background
Because actor.background no longer exists and emitted errors when
referenced.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2949

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1343
2020-07-03 14:41:48 +08:00
Jonas Ådahl
5ea54426b9 st/adjustment: Add ::actor property
Will be used by transitions to set the timeline actor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299
2020-07-02 20:50:03 +00:00
Mariana Picolo
482c655590
messageTray: Remove SourceActorWithLabel class
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1346
2020-07-01 20:20:26 -03:00
Jonas Dreßler
d885486397 st/widget: Remove get_resource_scale function
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
2020-06-30 13:42:18 +00:00
Florian Müllner
140ab4dec1 unlockDialog: Fix scale-factor handling on multihead
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
2020-06-30 13:12:08 +00:00
Sebastian Keller
845122497b altTab: Remove down arrow when removing an app from switcher
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/2935

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1340
2020-06-29 22:51:41 +02:00
Florian Müllner
e90466347a cleanup: Use Meta.Workspace.active property
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1337
2020-06-29 17:09:38 +02:00
Jonas Dreßler
73f8c1c482 inhibitShortcutsDialog: Enable line wrapping for additional label
The inhibitShortcutsDialog can show an additional label which explains
how to restore shortcuts. This label is not managed by the
MessageDialogContent, so we need to enable line wrapping and disable
ellipsization ourselves.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2616

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
Jonas Dreßler
0ff75941ea dialog: Return GLib.SOURCE_REMOVE instead of false
This is more readable than just returning false.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
Jonas Dreßler
e4bb2037ca dialog: Check whether text changed when setting title or description
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/2574

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
Georges Basile Stavracas Neto
0717f76362 Replace anchor point by translation and pivot point
Anchor point is deprecated and will eventually be removed from
Mutter's Clutter. Replace them by a combination of pivot point
and translation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334
2020-06-26 21:03:57 +00:00
Florian Müllner
da738988cd workspacesView: Small cleanup
scrollToActive() and friends are only used for handling the 'switch-workspace'
animation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1333
2020-06-26 16:19:57 +02:00
Florian Müllner
e86e88ea47 workspacesView: Don't make reactive
Since commit a11f417cd0, scroll events are handled by the SwipeTracker.
There's no other reason for the view to be reactive, so don't make it so.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1333
2020-06-26 16:19:57 +02:00
Georges Basile Stavracas Neto
8f8ecdb983 appDisplay: Update folder dialog field before ungrabbing
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
2020-06-24 18:06:21 -03:00
Georges Basile Stavracas Neto
8f547c9d5d iconGrid: Adjust animation delay
As per design feedback, adjust the animation delay to be shorter.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
2020-06-24 18:06:21 -03:00
Georges Basile Stavracas Neto
821f3e8ddf overview: Pass drag source on item-drag-* signals
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
2020-06-24 18:06:21 -03:00
Florian Müllner
26d27fdbf8 overview: Define ANIMATION_TIME earlier
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
2020-06-24 15:41:12 +02:00
Daniel van Vugt
c7e597cf72 overviewControls: Animate sidebars the same duration as windows
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
2020-06-23 19:07:30 +00:00
Jonas Dreßler
e4db68a1da Revert "workspacesView: Work around spurious allocation changes"
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
2020-06-23 19:05:05 +00:00
MOZGIII
980a90f8fb dateMenu: Do not ellipsize clock
This addresses the issue with ellipsized clock that occurs when using
extensions that move the clock from the middle to the side of the top
bar.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1327

Signed-off-by: MOZGIII <mike-n@narod.ru>
2020-06-23 16:14:24 +00:00