Ole Jørgen Brønner
2c9036deee
Base sync on destinationX of clone
...
No known problems with using plain x, but destinationX is more correct
2017-10-12 20:00:04 +02:00
Tor Hedin Brønner
0be793d08e
Update selection highlighting when reording windows
2017-10-12 20:00:04 +02:00
Tor Hedin Brønner
d35e5fd1ea
Add padding to the minimap wrappers
2017-10-12 20:00:04 +02:00
Tor Hedin Brønner
ad94a2256e
Add window selection highlighting to the mulitmap
2017-10-12 20:00:04 +02:00
Ole Jørgen Brønner
c6f41de0b8
WindowNavigator: Make sure _select is called initially when switching workspace
...
Omitting this has no ill-effect currently, but in the selectionChrome branch[1]
it results in an empty selection when switching to a workspace out of bounds.
[1] 29d2cdfede0172ea4b420e9cae626a8c5f1bc203
2017-10-12 12:56:36 +02:00
Tor Hedin Brønner
b0ed1bec69
Refactor selectSpace(direction, move) out of _doAction
2017-10-12 07:39:22 +02:00
Tor Hedin Brønner
091e83fedd
Make Minimap global to enable dynamic re-eval
2017-10-11 22:51:12 +02:00
Tor Hedin Brønner
06e974add6
Minimap: set non-scaled clones above
...
Fixes scaled windows hiding windows on the viewport.
2017-10-11 22:46:03 +02:00
Tor Hedin Brønner
08f7a9462b
Basic window moving between workspaces
...
Issue: Moving the window isn't actually animated in the multimap.
Note, for some reason doing an ensure on the selectedWindow makes it visible
while we preview the workspace.
2017-10-11 02:43:00 +02:00
Tor Hedin Brønner
1bfab13ddd
When changing workspace use _select to ensure the new selected window
...
This fixes eg. top bar visibility when going from a fullscreen window to a
non-fullscreen window.
2017-10-11 02:05:37 +02:00
Ole Jørgen Brønner
854de22289
Make sure the moving window is on top (in minimap)
2017-10-10 21:31:50 +02:00
Ole Jørgen Brønner
e76687b248
Reordering in minimap
...
Ref: ffdc032e70 (needed to not screw animations
up)
2017-10-10 21:25:37 +02:00
Ole Jørgen Brønner
ffdc032e70
Don't relayout the minimap on "allocation-change"
...
This signal is triggered way too often and there is no realistic scenarios where
its needed atm. (window's doesn't change size at will)
2017-10-10 20:40:46 +02:00
Tor Hedin Brønner
8884617818
Position the minimap around the selected window clone
...
This fixes the wrong initial position of unselected minimaps (ie. where
ensure_viewport haven't run yet), and won't animate the very start.
2017-10-10 18:24:06 +02:00
Tor Hedin Brønner
c774de350f
Refactor the Minimap into a proper class
...
We now recreate the minimaps instead of having the spaces point to them.
2017-10-10 18:23:40 +02:00
Ole Jørgen Brønner
dc72257349
Minor refactor Minimap: make helper function non-destructive
2017-10-09 19:53:38 +02:00
Ole Jørgen Brønner
c36960f973
Remove redundant MultiMap/switcherlist property
2017-10-09 19:23:23 +02:00
Ole Jørgen Brønner
88e21c353a
Enable navigating from empty workspaces
...
Also allow an empty workspace to be the top mru item. "Non-top" empty workspaces
will always be at the bottom due to how we build the mru list.
2017-10-09 19:09:38 +02:00
Ole Jørgen Brønner
69f817764c
Remove unused function
2017-10-09 18:55:19 +02:00
Tor Hedin Brønner
bf300a7632
Use the correct start index depending on mru style or not
2017-10-09 18:48:44 +02:00
Tor Hedin Brønner
0aeb9102d5
Refactor MultiMap to a proper class
...
Exposes the viewport as this.actor instead of everything being stuck on an
ClutterActor.
2017-10-09 18:47:33 +02:00
Tor Hedin Brønner
69c984fc45
Use mru for workspace navigation by default
...
fixes #29
2017-10-09 17:59:00 +02:00
Tor Hedin Brønner
5464e6b885
Update space.selectedWindow on _select
...
This makes folding and revisiting workspaces in the PreviewNavigator work
properly. The changes made will not be undone by escape, however, but that
should probably be handled by acting on copies of the spaces and committing or
throwing them away depending on if we _finish or escape.
2017-10-08 17:13:59 +02:00
Ole Jørgen Brønner
d0d7f1757c
Fix remaining st_widget_get_theme_node warnings
...
Ref: bb914882b0
2017-10-07 17:14:24 +02:00
Ole Jørgen Brønner
bb914882b0
Fix massive st_widget_get_theme_node warnings from minimap/multimap
...
st_widget_get_theme_node called on the widget [0x3f47ec0 StWidget "window-clone-container"] which is not in the stage.
This warning is emitted if any information dependent on a widget's style is
requested before the widget is attached to the stage.
In this case the culprit was that St.Widget.get_preferred_width/height call
st_widget_get_theme_node even when its layoutmanager dictate the preferred size.
It's convenient to be able to use the size of the window clones prior to
attachment, and the size should not depend on any styling.
We don't use any St functionality in the clone wrapper so simply use a regular
Clutter actor.
2017-10-06 15:46:14 +02:00
Ole Jørgen Brønner
deae7803b3
Add actor names to aid debugging
2017-10-06 14:01:52 +02:00
Ole Jørgen Brønner
aadd6aa2aa
Notes: gnome-shell, mutter, clutter relationship ++
2017-10-05 16:57:28 +02:00
Ole Jørgen Brønner
90d476b3b0
Size the minimaps in whole pixels
...
This fixes the multimap viewport alignment issue for the last workspaces.
2017-10-05 16:26:35 +02:00
Tor Hedin Brønner
8a4aeb82ab
Arrow functions doesn't have arguments in newer spidermonkey
...
Gnome-shell 3.26 uses a newer spidermonkey engine which doesn't give arrow
functions access to the `arguments` keyword. Using `function` instead fixes
this.
Also use [...arguments] to copy arguments as slice apparently can have a
performance penalty:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments
2017-10-05 14:12:43 +02:00
Tor Hedin Brønner
61d57ab409
Set border radius for multimap viewport border
2017-10-05 00:25:13 +02:00
Tor Hedin Brønner
3086633bc3
Make it possible to select empty workspaces
...
Disables debugging which assumes that there's a window in the workspace.
SwitcherPopup.show requires that _items.length > 0 so we need something else to
fix that.
2017-10-05 00:11:17 +02:00
Ole Jørgen Brønner
db6a069a7b
Add missing dependency
...
Worked before because we assign `Clutter` globally elsewhere
2017-10-03 17:53:11 +02:00
Ole Jørgen Brønner
80bcf463eb
WindowNavigator: Implement _keyPressHandler properly
...
We delegated to altTab.WindowSwitcherPopup before. Now that we inherit directly
from SwitcherPopup we must return the expected values ourself.
Escape should abort the popup (not properly across workspaces though)
2017-10-03 17:48:05 +02:00
Ole Jørgen Brønner
d9d627e244
Notes: keybindings
2017-10-03 16:55:56 +02:00
Tor Hedin Brønner
824163fa61
Don't animate in setSelected when animate is false
2017-10-03 16:05:37 +02:00
Tor Hedin Brønner
3c70e12080
Position the multimap correctly when only showing one minimap
2017-10-03 16:03:35 +02:00
Ole Jørgen Brønner
4b5572b3d8
Multimap: when selecting an *already selected* workspace, don't fold it
...
When animating this resulted in the selected entry being folded. Not sure why,
since the subsequent fold should overwrite the fold tween? (try moving a
workspace up from the very first workspace)
Could of course do an early return if we try to reselect the current entry.
Might be cleaner, but the we'll have to ensure we don't use setSelected to
ensure a correct start state.
2017-10-03 15:48:53 +02:00
Tor Hedin Brønner
bc6a9188a8
Only show other workspaces while going up/down
...
This requires a `showAll` function in multimap.
2017-10-03 14:21:38 +02:00
Tor Hedin Brønner
113d936310
Add viewport border to the multimap
2017-10-03 14:18:43 +02:00
Tor Hedin Brønner
a2c836ff34
Don't try to preview worksapces that doesn't exist
2017-10-03 01:46:40 +02:00
Tor Hedin Brønner
3f8d78d605
Animate fullscreen windows fully out when previwing workspaces
...
For some reason the gnome-shell code subtracts the panel height from the yDest,
this will leave any fullscreen windows visible when moving up.
2017-10-03 01:33:46 +02:00
Tor Hedin Brønner
00df7f16bf
Make sure we complete any workspace switching is finished
2017-10-03 01:14:51 +02:00
Tor Hedin Brønner
3da318b645
Set the correct pivot points on minimap fold
2017-10-02 21:48:45 +02:00
Ole Jørgen Brønner
647a143231
Use preview_navigate to switch workspace as default
2017-10-02 20:16:21 +02:00
Ole Jørgen Brønner
a5f683d9f1
Allow printing stacktraces of existing errors too
2017-10-02 19:45:09 +02:00
Tor Hedin Brønner
2e79d6666d
Quite buggy workspace up/down action in PreviewNavigator
2017-10-02 19:43:27 +02:00
Tor Hedin Brønner
3541c7b910
Expose selectedIndex on the multimap
2017-10-02 19:42:35 +02:00
Tor Hedin Brønner
d175348f73
Let SwitcherPopup do positioning by specifying the correct height
2017-10-02 18:39:45 +02:00
Tor Hedin Brønner
e84b834960
Don't animate the first unfold
2017-10-02 18:37:16 +02:00
Tor Hedin Brønner
d5efdf74a2
Remove obsolete code
2017-10-02 18:34:17 +02:00