Commit Graph
127 Commits
Author SHA1 Message Date
Tor Hedin Brønner 3f1b4a7b8f minimap: Limit highlight height 2019-10-17 22:25:56 +02:00
Tor Hedin Brønner f113077d88 minimap: add some minimum monitor padding 2019-10-10 07:53:22 +02:00
Tor Hedin Brønner 7277e90433 Fix non-default transition modes 2019-09-28 16:20:42 +02:00
Tor Hedin Brønner 18fd713900 Use clutter animations
There's a few differences in how onComplete is run:
- We need to run moveDone on every clone transition, as the transitions aren't
done when cloneContainer's transition finishes
- We cannot run layout until startup is done. For some reason onComplete runs
before monitor setup is done properly.

squash! Use clutter animations

- Can't use addTween as a timeout, but transitions are now finished when
onComplete is run, so there's no need for this anymore.
2019-09-28 15:06:57 +02:00
Tor Hedin Brønner 7fb9f4a0c1 Fix full hot code reload
`getCurrentExtension()` does not work with gnome-shell-mode's eval. Use a
somewhat verbose feature detection to work around the changes made in 3.34.
2019-09-03 17:36:37 +02:00
Rasmus Eneman f949799c37 Fix crash under Gnome 3.34 2019-08-30 08:16:23 +02:00
Tor Hedin Brønner ff8d8c4d45 Stability: null out destroyed actors
Acting on destroyed actors crashes 3.32 so make sure to null out references.
2019-04-15 21:01:02 +02:00
Tor Hedin Brønner 94e671b721 Prevent some more crashes from the minimap 2019-03-27 01:46:27 +01:00
Tor Hedin Brønner f91a877dbc minimap: avoid warnings 2019-03-24 03:49:36 +01:00
Tor Hedin Brønner 3bba634862 minimap: Guard against acting on unmapped actor
This might've caused some spurious crashes
2019-03-24 03:49:36 +01:00
Tor Hedin Brønner a890ffc406 minimap: don't show highlight on empty workspace 2019-01-12 18:35:17 +01:00
Ole Jørgen Brønner 1d84820ab1 Minimap: react to new space signal "full-layout"
full-layout: everything in the space can have changed
2018-12-30 23:58:37 +01:00
Tor Hedin Brønner 2a4199029d minimap: Respect window-gap properly
There were some hardcoded values left which really should've observed the
`window-gap` preference.
2018-07-15 20:39:44 +02:00
Tor Hedin Brønner 3548f219a2 Rename prefs.js to settings.js
prefs.js causes issues as its used to lauch the settings gui from eg. tweaks.
2018-07-02 22:31:55 +02:00
Tor Hedin Brønner a0b6cdf9d4 minimap: layout on window-removed
Allocate isn't run as much now so run it manually.
2018-07-02 15:01:04 +02:00
Tor Hedin Brønner d310553715 minimap: position on correct monitor 2018-07-01 12:26:53 +02:00
Tor Hedin Brønner ce58c1c2b6 Refactor signal handling into utils.Signals class
We use this pattern all over the place:
```
  signals = [ foo.connect('bar', handler) ];
  signals.forEach(id => foo.disconnect(id));
```
So we abstract it into a class that keeps track of the state automatically.
2018-06-29 13:56:06 +02:00
Tor Hedin Brønner c1bc171491 navigator: Create minimaps on demand
Show a minimap when navigating a space while preview is active.
2018-06-29 13:56:06 +02:00
Tor Hedin Brønner 948d8230a8 minimap: simplify layout 2018-06-29 13:18:12 +02:00
Tor Hedin Brønner ed2cebdddf minimap: Extend Array to mimic Space 2018-06-29 13:18:12 +02:00
Tor Hedin Brønner bcee9acfb8 Move _reorder to Space.swap(direction, window)
Emit `Space::swapped`
2018-06-29 13:18:12 +02:00
Tor Hedin Brønner 204b8ffcb5 Let the minimap take care of its own position 2018-06-29 13:18:09 +02:00
Tor Hedin Brønner 6fda263957 Update the minimap through signals from the space
A space now emits four signals (supplying these arguments):

1. `select`, which runs on `ensureViewport`
2. `window-added` (metaWindow, index, row)
3. `window-removed` (metaWindow, index, row)
4. `monitor-changed`, currently not used

The minimap hooks into these signals updating as necessary. This is a lot
cleaner and goes a long way untangling the minimap from the navigator. One nice
effect is proper support of adding and removing windows when the minimap is
active.

It also works better on wayland as there's less reliance on synchronous updates.
2018-06-29 13:17:50 +02:00
Tor Hedin Brønner e2daba83c9 minmap: Make room for vertical window gaps 2018-06-25 16:50:44 +02:00
Tor Hedin Brønner aff871d783 navigate: Fix reordering 2018-06-25 16:50:44 +02:00
Tor Hedin Brønner 0db0bd81fd minimap: Render vertical tiling 2018-06-25 16:50:44 +02:00
Ole Jørgen BrønnerandTor Hedin Brønner 92d7974204 Only render first row of columns in minimap (instead of flattening everything) 2018-06-25 16:50:43 +02:00
Tor Hedin Brønner fc3628bad4 Refactor space into an array of columns
This sets us up for supporting vertical tiling.
2018-06-25 16:50:43 +02:00
Tor Hedin Brønner 3e4d9901d5 minimap: Use a more visible style for selection highlight 2018-06-14 21:14:33 +02:00
Ole Jørgen Brønner f6c8b902df Bugfix: selected window in minimap somtimes out of view for large maps
Happened if the minimap strip exceeded the monitor width and the initially
selected window was one of the rightmost windows.
2018-06-03 10:19:15 +02:00
Tor Hedin Brønner 170df6ba34 minimap: Use whole pixel values consistently 2018-05-21 22:31:14 +02:00
Tor Hedin Brønner 6942df947f Monitor preference changes
Introduces `prefs.js` with simple `settings::change` signal handling.

Also put workspace colors in the schema and draw them from there.
2018-05-15 16:31:01 +02:00
Tor Hedin Brønner 000881524a New minimap
Simple switcherlist styled minimap without any animations.

TODO: add fading at the edges
2018-05-10 22:30:40 +02:00
Tor Hedin Brønner e2f0b84ce7 Only create a single minimap 2018-05-07 14:15:47 +02:00
Tor Hedin Brønner 92e9209518 minimap: Guard against realWindow being null
For some reason this can now trigger a whole bunch.
2018-05-02 11:14:24 +02:00
Tor Hedin Brønner c80a8df1ad Show the minimap on the active monitor
There's a bug in SwitcherPopup where pushModal will sometimes fail on
`parent.show`. We therefor move most of the initialization to
`_initialSelection` which is run after the `pushModal` calls.

This also caused the issue where animations would randomly be blocked after a
navigation, which should be fixed now.
2018-05-02 11:02:09 +02:00
Tor Hedin Brønner 42aedba3b6 Use var for all top level declarations to avoid warnings
We're assessing all top level declarations from outside the original scope when
we're evaluating code. So everything should be `var`.

Classes are `let` bound so we should use var for `ClickOverlay` too, but there's
a bug in gnome-shell-mode making such statements not evaluate. We therefor wait
for that to be fixed.
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner cce3341afd Use correct coordinates when animating windows
Adds a `Space.monitor` property, hard coded to the primary monitor for the
moment. `move` needs to know about which space it's moving windows on.

It seems that we really don't have to worry about scaling, as it mutter should
take care of it automatically.

fixes #47
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner 00ed83eb19 Spaces: add generic mru method 2018-04-22 15:01:57 +02:00
Tor Hedin Brønner 6e198425e7 minimap: remove noisy and useless debug print 2018-04-04 05:45:17 +02:00
Tor Hedin Brønner ccf59e8a6b Don't access label after it's destroyed 2018-03-11 22:16:14 +01:00
Tor Hedin Brønner 56dac2a8b6 Get the Extension object via hardcoded uuid lookup
This enables reloading of a whole module.
2017-12-03 19:18:14 +01:00
Tor Hedin Brønner a8bfae0333 Use less abrupt staggered scaling on fold 2017-10-30 15:16:48 +01:00
Tor Hedin Brønner d7adf22ff2 Use proper function syntax
There's no longer any reason to use `var name = function()` or
`var name = ()=>{}`.
2017-10-29 16:12:53 +01:00
Tor Hedin Brønner c18190c3a4 Make spaces local
`var spaces = Tiling.spaces` in minimap.js doesn't work for some reason.
2017-10-28 01:37:22 +02:00
Tor Hedin Brønner a72767bfd2 Make primary local
We want to reference primary through `Tiling` as it can change on
`monitors-changed`.
2017-10-27 21:47:29 +02:00
Tor Hedin Brønner fb360b5695 Everything but primary and spaces should be local now 2017-10-27 21:32:18 +02:00
Tor Hedin Brønner d8e6cb32ad Make debug local
Add `Extension` and `debug` to all the module scopes for convenience.

(also add var to non-used function)
2017-10-27 21:23:46 +02:00
Tor Hedin Brønner bfb4414cb9 Make most globals module local
Functions which are called from signals is left alone for now since
`dynamic_function_ref` depends on looking up things in `window`. `debug` is
also still a global.
2017-10-27 19:55:15 +02:00
Tor Hedin Brønner 5306e6c1e4 Add minimap padding 2017-10-26 13:17:08 +02:00