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
Tor Hedin Brønner
4cf04a7b18
Minimal setup to use the multimap with Super </>
...
- We inherit from SwitcherPopup instead as now only need keyhandling.
- We need rescue the minimaps from destruction on destroy
2017-10-02 18:15:24 +02:00
Ole Jørgen Brønner
02289b7615
Remove unused class
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
59bae795e1
Cleanup: proper member variables
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
e38d4230a4
Calculated the scaled size ourself so we don't rely on being part of the stage
...
Don't add stuff to the stage in the constructor.
get_transformed_size only work when the actor is part of the stage.
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
c0f0a66db8
Don't animate *everything* when showing the multimap
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
cd03b72ac9
Reparent instead of add
...
In theory more robust
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
747562d788
MultiMap: onlyShowSelected
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
a9b25590da
Very rough "multimap"
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
aad6dd51e8
WindowCloneLayout reports frame rect size
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
76f35b8358
Let the minimap owner handle positioning
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
2ae0f32889
Handle empty workspaces/minimaps
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
6e08e92b0d
Ups, typenames must be unique
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
126da56a68
WIP: Two working alternatives for a wrapper that let us use "frame coordinates"
...
Note: the allocation method is called ALOT
WindowCloneLayout based on the one in workspace.js, but the original
calulates the offset based on a static frame_rect. Unless that's updated the
clone's position will follow the source. The containers position (using the
layout manager) will _not_ follow it though. So the clone is not properly
contained inside the container..
2017-10-02 17:17:16 +02:00
Ole Jørgen Brønner
e0e1e624ec
Experimental stuff
2017-10-02 17:17:16 +02:00
Tor Hedin Brønner
b5af3c2017
Only ensure if the window is part of the space
2017-10-01 16:50:15 +02:00
Tor Hedin Brønner
2bee270ccf
Just scale the top bar down, don't hide it, when ensuring
...
This prevents the hide signal being triggered and doing the wrong thing while
previewing a fullscreen window while `selectedWindow` is non-fullscreen.
2017-10-01 14:45:41 +02:00
Tor Hedin Brønner
5beb29fa1b
Override panel hiding when selectedWindow isn't fullscreen
2017-10-01 13:16:22 +02:00
Tor Hedin Brønner
29fd979467
Add LiveAltTab popup based on WindowSwitcherPopup
...
Issues:
- When releasing mid animation focus will restart the workspace switch animation
- There's no workspace animation back when escaping the popup
2017-09-30 01:11:17 +02:00
Tor Hedin Brønner
ce54af8b92
Add _previewWorkspace and _previewWorkspaceDone to WindowManager
...
Gives more fine grained control as we can call complete when appropriate and
omits signaling mutter that workspace switching is finished, as we're not
responding to the `switch-workspace` signal.
2017-09-30 00:59:01 +02:00
Ole Jørgen Brønner
a08d6e0be7
Some development utils: eg. update global variables command: Super-Insert
...
+ A function to visualize the window boxes (frame_rect and buffer_rect)
2017-09-29 16:09:40 +02:00
Tor Hedin Brønner
fd9dd50383
Only set ensure selectedWindow if there's windows in the workspace
...
This broke enable and further initalization.
2017-09-29 14:52:58 +02:00
Tor Hedin Brønner
e530addb5e
Leftover x_offset in fold
2017-09-28 15:21:14 +02:00
Tor Hedin Brønner
8238d487c6
Put the WindowActor clone inside a St.Widget for style and position
2017-09-28 14:23:50 +02:00
Tor Hedin Brønner
3500089e8d
Fix typo
2017-09-28 13:37:09 +02:00
Ole Jørgen Brønner
0269af8aee
stylesheet.css
...
And a placeholder style for selected window in minimap.
The extension system load this file automatically. Simply set the class on a st
widget to use:
new St.Bin({ style_class: "paper-mm-selected-window"});
The border is part of the width though (box-sizing not supported I think) so
if we're going to use borders directly around the clone some adjustment will be
needed to keep 100% aligned with the actual space.
2017-09-28 13:29:11 +02:00
Ole Jørgen Brønner
91e0f5e978
Naming: createMinimap -> Minimap
...
(constructor style)
2017-09-28 11:52:45 +02:00
Ole Jørgen Brønner
f1d9fdca6e
Space.selectedIndex util method
2017-09-27 23:02:56 +02:00
Ole Jørgen Brønner
0c9034255d
Don't repopulate minimap when hiding it
2017-09-27 23:02:56 +02:00