Commit 64b2b4a7d4 changed the monitor layout handling, resulting
in some layout errors due to a subtle change in memory handling:
when zooming a window in the overview, the available zoom area is
calculated by subtracting the panel height from the primary monitor
area. This area used to be a copy of the monitor rect, but as now
the rect itself is returned, zooming a window on the primary monitor
repeatedly modifies the monitor rect, leading to layout errors in
various parts of the shell.
Fix by using a copy when calculating the available zoom area.
https://bugzilla.gnome.org/show_bug.cgi?id=654105
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.
https://bugzilla.gnome.org/show_bug.cgi?id=636963
Currently the user has to find an empty spot in the workspace
to be able to launcha new instance of an app using dnd.
This is unnecessary hard, so just allow dropping on windows too.
https://bugzilla.gnome.org/show_bug.cgi?id=652079
Workspaces used to contain the desktop background, so when a
workspace was removed, we animated its actor to an off-screen
position before destroying it. As the background has been
removed a while ago, we can destroy the actor directly.
https://bugzilla.gnome.org/show_bug.cgi?id=645031
The mouse-wheel zooming "easter egg" breaks horribly when you
drag a window, due to ugly lightbox reparenting tricks it uses.
For now, just end any zoom before we drag the window around.
https://bugzilla.gnome.org/show_bug.cgi?id=649632
If a user is fast and mouses over a window while the workspace thumbnail
animations are playing, it can be frustrating when the close button won't
appear at the end of the animation.
https://bugzilla.gnome.org/show_bug.cgi?id=645848
Don't do an individual hover fixup for every window overlay, instead
just use the new global.sync_hover() to fix up hovers once we have
finished showing the overview.
Based on a patch from Adel Gadllah <adel.gadllah@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=638613
We create a Workspace with a null metaWorkspace for each
non-primary monitor, showing the windows on these monitors.
These are saved in WorkspaceView.extraWorkspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=609258
This means a bunch of windows will not be visible at all in the overview.
Those will be added back with per-screen workspaces on the non-primary
monitors.
https://bugzilla.gnome.org/show_bug.cgi?id=609258
Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.
https://bugzilla.gnome.org/show_bug.cgi?id=636868
If we're dragging a window around and we need to reposition the windows,
due to e.g. the sliding in of the thumbnails or some other reason, then we
need to consider the original position of the dragged window, rather than
the currend drag position. Otherwise we will unnecessarily rearrange the
other windows for instance on snap-back if you moved the dragged window
past some other window.
https://bugzilla.gnome.org/show_bug.cgi?id=643786
We currently show the workspace in the overview in a rectangle
with the same aspect ratio as the screen. Originally this was
probably done since it showed the desktop, but we don't do this
anymore, and the positioning of the windows in the overview is
strictly a grid, so its not in any way related to monitor geometry.
Additionally, in the multihead case the screen aspect ratio is
very different from the overview monitor geometry, so a lot of
space is lost.
So, instead we just fill the entire inner rectangle of the overview
with the workspace. However, the way the zoom into and out of the
workspace right now is by scaling the workspace so that it covers
the entire monitor. This cannot really work anymore when the workspace
is a different aspect ratio. Furthermore the coordinates of the
window clone actors are of two very different types in the "original
window" case and the "window in a slot case". One is screen relative,
the other is workspace relative. This makes it very hard to compute
the cost of window motion distance in computeWindowMotion.
In order to handle this we change the way workspace actor positioning
and scaling work. All workspace window clone actors are stored in
true screen coordingates, both the original window positions and the
in-a-slot ones. Global scaling of the workspace is never done, we
just reposition everything in both the initial zoom and when the
controls appear from the side.
There is one issue in the initial and final animations, which is that
the clip region we normally have for the workspacesView will limit the
animation of the clones to/from the original positions, so we disable
the clip region during these animations.
https://bugzilla.gnome.org/show_bug.cgi?id=643786
When we are dragging a window over its current workspace or workspace
thumbnail, we show show "no drop possible" feedback instead
of "move here" feedback.
https://bugzilla.gnome.org/show_bug.cgi?id=642329
Make calling workspace.setReservedSlot(null) do nothing if the slot was
already null; this improves efficiency and more importantly chills out some
weird reentrancy at the end of drag and drop that removes a window from
a workspace.
With workspace thumbnails, we don't switch workspaces when dragging windows
between workspaces or adding new workspaces, so we also shouldn't switch
on launch.
* Add workspace parameters to shell_doc_system_open(),
shell_app_activate, shell_app_open_new_window()
* Pass a 'params' object when activating items in the overview with
two currently defined parameters: workspace and timestamp. (timestamp
is only implemented where it is easy and doesn't require interface
changes - using the global current timestamp for the shell is almost
always right or at least good enough.)
https://bugzilla.gnome.org/show_bug.cgi?id=640996
When checking the type of a DND source, instead of checking
'instanceof Workspaces.WindowClone' accept any actor with realWindow
and metaWindow properties. This will be useful to support a separate
type of actor dragged from workspace thumbnails.
https://bugzilla.gnome.org/show_bug.cgi?id=640996
Commit 91d8a32f25 let WindowClone forward the size-changed signal
of the "real" window, disconnecting the signal handler when the
clone is destroyed. In case the clone was destroyed due to the
MetaWindowActor being closed, this results in a warning
(gsignal.c:2392: instance `0x2a3fac0' has no handler with id `2955').
Handle the case where the original window is destroyed before its
clone.
Windows may change their size while the overview is open, e.g. when
switching panels in the control center. Make sure that the preview's
position and overlay are updated in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=640560
Given that the grid view is gone there is no point in animating the
window previews on all workspaces anymore so just do it for the current
one avoid taking a slow down caused by animating windows on other workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=637353
Delegate the emission of the window-drag-begin/window-drag-end
signals to overview functions, as done already for other items.
This will enable objects to react to those signals without having
access to the workspace objects / the workspaces view.
https://bugzilla.gnome.org/show_bug.cgi?id=634948
The new layout does no longer support view switching, so merge
GenericWorkspacesView and SingleView, and remove MosaicView.
Also rename or remove workspace properties and functions which
are now unused.
The grid will have a comeback with the new DND behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=634948
While scaling the desktop background with the window previews represents
workspaces quite intuitively, the approach is not without problems.
As window previews in the overview behave quite differently to "real"
windows, the representation of workspaces as miniature versions of
"real" workspaces is flawed. The scaling also makes the transitions
to and from the overview much more visually expensive, without adding
much benefit.
Leaving the background in place provides more visual stability to the
transitions and emphasizes the distinctive behavior of elements in the
overview.
https://bugzilla.gnome.org/show_bug.cgi?id=634948
The code to draw the root background has now been moved into Mutter,
with added smarts to not draw obscured portions. Remove the old
version of the code and clone the Mutter background actor to draw
the background in the overview.
https://bugzilla.gnome.org/show_bug.cgi?id=634836
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.
https://bugzilla.gnome.org/show_bug.cgi?id=632500
Although within St itself there are situations where the semantics of
these functions (return TRUE or FALSE and return the actual value in
an out parameter) is useful, it's mostly just annoying at the
application level, where you generally know that the CSS property is
going to specified, and there is no especially sane fallback if it's
not.
So rename the current methods to lookup_color, lookup_double, and
lookup_length, and add new get_color, get_double, and get_length
methods that don't take an "inherit" parameter, and return their
values directly. (Well, except for get_color, due to the lack of (out
caller-allocates) in gjs.)
And update the code to use either the old or new methods as appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=632590
Return a DND.DragMotionResult constant from delegate _handleDragMotion
methods as well as the existing return value from the drag monitor method dragMotion.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
The design calls for item to not appear abruptly, but not too slow
either - 100ms seems to be a good sweet spot for elements which are
supposed to appear "instantly".
Add a fade effect to the alt-tab popup and set the timings for other
fade effects to 100ms.
https://bugzilla.gnome.org/show_bug.cgi?id=621247
Currently, the drag and drop code assumes that on a successful drop
the target will either consume the drag actor or that it is otherwise
OK to destroy the actor.
As the drag behavior for window preview was changed, dropping a preview
on the dash now results in the preview being swallowed - to fix, add an
option to restore the actor in case of a successful drop as well.
https://bugzilla.gnome.org/show_bug.cgi?id=619203
This is our convention.
The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
A single window that does not need to be scaled down, should be centered
and not placed at the bottom.
To avoid blurryness window positions should be pixel aligned.
https://bugzilla.gnome.org/show_bug.cgi?id=617827
Centralize the update of actor visibilities (overlays, shadows,
off-screen workspaces). Adjust the way scrolling is handled so
that it works correctly with removed workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=610191
We can't use gdk_display_get_pointer/gdk_window_get_pointer from gjs
when XKB is active. We already had a wrapper that did the
get-modifier-state part of that, but some places also need the
get-pointer-location part of it. So update our wrapper to return both,
and update js code to use it.
https://bugzilla.gnome.org/show_bug.cgi?id=613428
The original window dnd code needed to track whether or not the
pointer was in the clone. Some later rewrite made this unnecessary,
but we were still keeping track anyway.
After closing a window, the remaining previews are repositioned
after a timeout; when it is called while the user zooms a preview,
the window positions get all messed up, so postpone the positioning
in this case until the zoom ends.
https://bugzilla.gnome.org/show_bug.cgi?id=613536
Using a clone for the drag actor causes the animation into
the final position not to work as expected; instead use
the newly added DND parameters to change the original
drag actors size and opacity. (This reverts the change in
011db9f).
Since we are using the original actor, we have to be careful
not to change it during the drag, so don't actually position
dragged window actors in Workspace.positionWindows().
https://bugzilla.gnome.org/show_bug.cgi?id=613367
Currently, the workspace objects are destroyed and recreated on
view switches. Instead, keep the objects around and reparent the
workspace actors on view switches.
https://bugzilla.gnome.org/show_bug.cgi?id=610191
As the repositioning after closing a window preview is delayed, it is
possible that the timeout is triggered while leaving the overview. In
that case the previews move to the new overview position and are changed
abruptly to the original window position when the overview zoom is done.
To prevent this, disconnect the handler when leaving the overview.
Hide the original actor during a grab, and create a new
clone. This is easier than trying to ensure we maintain
the state of the original window clone.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
Currently clicking on an empty spot on the workspace actors switches to the workspace, this has a side effect that when for some reason (like using a touchpad),
the user misses the window he intends to open he will end up with the currently focused window instead.
Disable this behaviour if more than one window is open (in that case the user has to explicitly target a specific window).
https://bugzilla.gnome.org/show_bug.cgi?id=610868
When closing windows in the window picker, the remaining windows
move to their new positions, which prevents the user from performing
additional actions in the picker until the animation stops and the
user adjusts to the new layout.
Instead we try to be smart and delay the repositioning, either until
the pointer stops moving or until it leaves the workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=611167
When figuring out where to position window previews, use the clone's
position instead of the the original meta window. There shouldn't be
a difference when entering the overview, but it makes the motion when
opening/closing new windows in the overview tinier and more predictable.
https://bugzilla.gnome.org/show_bug.cgi?id=611167
When leaving the overview by hitting escape or super, all windows animate
to their original positions. Zoomed windows are kept above others until
the animation ends, then the focused window is brought to the front; as
this looks odd if the zoomed window does not have focus, cancel the zoom
in that case before leaving the overview.
https://bugzilla.gnome.org/show_bug.cgi?id=609243
While zooming, a window clone is reparented to the stage and thus cannot
be destroyed automatically by the "parent" container. To prevent the clone
and the corresponding overlay from leaking, we enforce destroying the clone
with the workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=609243
WindowOverlay has two actors, both with custom style properties, which
share a common _onStyleChanged() handler. This is not a problem when
entering the overview, because the actors' parent (the workspaces group)
is hidden while the actors are added. However, when windows are added to
the workspace while in the overview (e.g. when opening a new window or
dragging a window from one workspace to another), adding the first actor
to the workspaces group triggers a style-changed signal - the handler
then calls st_widget_get_theme_node() on both actors, which triggers a
warning as the second actor has not been parented yet.
https://bugzilla.gnome.org/show_bug.cgi?id=610279
Unify the style of <delegate>.destroy() methods to only contain a
call to <delegate>.actor.destroy() and handle additional cleanup
in a _onDestroy() signal handler.
https://bugzilla.gnome.org/show_bug.cgi?id=609454
This way, clicking a message tray icon while the overview is open will
close the overview when activating its window.
Remove some other overview-related activation code which is now
redundant.
Also, remove calls to "global.get_current_time()" when calling
Main.activateWindow, since it's unnecessary (activateWindow will call
it itself if you don't pass in that arg).
https://bugzilla.gnome.org/show_bug.cgi?id=609765
As desktop icons don't have any purpose in the overview (except for
distracting the user), fade them out when entering the overview.
Unfortunately, the fading effect affects performance, therefore hide
icons directly when there are maximized windows on the desktop.
https://bugzilla.gnome.org/show_bug.cgi?id=600999
'workspace_relative' is used in workspace.js, not in workspacesView.js
Change a couple strings to have single quotes instead of double quotes to indicate that
they don't need to be translated.
Matching the 20091114 mockup, the default workspace view
is now a scrollable horizontal list, with a control to
switch between this and the previous grid view.
https://bugzilla.gnome.org/show_bug.cgi?id=593844