Commit Graph
865 Commits
Author SHA1 Message Date
Ole Jørgen Brønner d3f2d07cf9 Move keybinding bookkeeping out of extension.js 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner f9fd005fa5 Utility function for checking if a key-combo is bound 2018-07-06 12:16:37 +02:00
Ole Jørgen Brønner 5bce8922c1 API for ad-hoc/schemaless/user keybindings 2018-07-06 12:16:37 +02:00
Tor Hedin Brønner 5a8a071b99 Only reset selection when the tiling is empty
Due to `focus` running before `window-removed` we would end up resetting the
selection width after it had been correctly set up.
2018-07-05 22:15:03 +02:00
Tor Hedin Brønner 4e8dcc5ad3 Refactor space.fixVisible out of move_to
We need to update the visible windows after layout too.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 266eb52c3b Rerun layout on a column if a frame's width changes unexpectetly
A typical case is mpv which preseerves its aspect ratio, resulting in a
completely different width than requested. This would cause `resize` to call
layout recursively running the first layout call last.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner d264382dac Connect to size-changed after initial placement and resize
This prevents the move_to call in `resizeHandler` leading to the wrong initial
position in wayland.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 8ae1814acb Only call moveDone once from layout 2018-07-04 20:47:04 +02:00
Tor Hedin Brønner a605dc4668 Clip tiled window actors to the monitor
fixes #61
2018-07-04 20:47:04 +02:00
Ole Jørgen Brønner c62c915c6a Always exit navigator on escape
Actions bound to escape would prevent the exit before.
2018-07-04 20:47:04 +02:00
Tor Hedin Brønner 18b116c2c1 Don't let the selection highlight protrude into the top bar 2018-07-03 18:05:45 +02:00
Tor Hedin Brønner 895b1915cd Add our own actions for all bindings
While we might need to steal some actions from gnome, we should support using
both actions if the user wants it.

Also add all the correct default bindings to the schema, and don't touch gesettings
at all. This should make it simpler to get #66 done.
2018-07-03 17:16:21 +02:00
Tor Hedin Brønner 4c9b7706bf Rename schema path to /org/gnome/shell/extensions/paperwm/
Also add /org/gnome/shell/extensions/paperwm/keybindings

NB! This is a breaking change to any existing config.
2018-07-03 17:01:57 +02:00
Ole Jørgen Brønner 4b7139fe2f log-viewer: speed up filtering 2018-07-03 15:08:00 +02:00
Ole Jørgen Brønner ab4caf200d log-viewer: Group stacktraces for better readability 2018-07-03 14:57:20 +02:00
Ole Jørgen Brønner 01e9161922 debug-util: function to visually distinguish window actors and clones 2018-07-03 13:48:09 +02:00
Tor Hedin Brønner 6b44a9139f cleanup: Remove a bunch of unconditional logging 2018-07-03 00:08:40 +02:00
Tor Hedin Brønner 2f27acc789 Hide clickoverlays when showing the overview 2018-07-03 00:08:40 +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
Ole Jørgen Brønner eb975ec811 centerWindow: only warp pointer if it's inside the selected window 2018-07-02 20:14:42 +02:00
Ole Jørgen Brønner 4f75b45ea8 Bugfix monitor relative coordinates 2018-07-02 19:44:58 +02:00
Tor Hedin Brønner d80abfbe11 Fix broken pointer warping on centerWindowHorizontally 2018-07-02 19:09:43 +02:00
Tor Hedin Brønner 6ff1af0c58 Document the new space structure 2018-07-02 18:56:23 +02:00
Tor Hedin Brønner 4ce41ab54b Fix highlight width while grab resizing 2018-07-02 18:29:24 +02:00
Tor Hedin Brønner 1f62242b56 Add and use Space.startAnimate 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner d03dc78cd6 Always select a neighbour when closing selectedWindow
Only look at the neighbours of the closed window when selecting a new window.

Also raise the window on ensure, this way the stacking order works like an mru
for selectedWindow.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 36b28ace99 Restore window position correctly when exiting fullscreen 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 714938fcde Don't add the clone twice 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner ea77c4609f Disconnect destroyed windows and actors 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 8c758c2ca2 Center small spaces in space.layout 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner c7efed3d62 Fix resize and new window animation on wayland
When a window actor is hidden its clone won't properly update its size, so we
manually fix it up in resizeHandler.

To complicate matters this bugs out the new window animation so we need to delay
connecting the `size-changed` signal.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner d78212cdd7 Don't do any resizing when adding existing windows on reload
Running `space.layout` when adding existing windows through `space.addAll`
causes the first window in every column to take up the whole height.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 7b55d03faf Make selection track the selected window
Reset selected highlight only when switching windows.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner ac0814cef9 Add grab handler when moving windows with the mouse 2018-07-02 18:28:25 +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 8e67ac3c49 Animate the cloneContainer instead of the clones
The cloneContainer now lives inside a `cloneClip` clipping the cloneContainer
correctly when previewing workspaces.

`ensureViewport` and `move_to` simply moves the scrollContainer instead of
laying out all the clones. The actual windows are only synced up with the clones
position on `Space.moveDone`. Space.layout is run when the actualy clone layout
changes, eg. when a window changes size, or a window is added to the tiling.

`move_to` also computes the windows that should show their MetaWindowActor on
`moveDone` and sets up the clickoverlays at the edges correctly.

`space.cloneContainer`s animation target can be looked at `space.targetX`.
2018-07-02 15:01:03 +02:00
Tor Hedin Brønner 5f3ee4aa68 Add Space.layout
Similar to Minimap.layout, it will move through the tiling from left to right
laying out clones correctly in the space.cloneContainer.

A clone's animation target can be looked up using `clone.targetX`.
2018-07-01 20:54:52 +02:00
Ole Jørgen Brønner b08194b9ab user.js: Initialize "local" imports in init
Otherwise gnome-shell-reload will fail.
2018-07-01 18:08:13 +02:00
Ole Jørgen Brønner 49f402c8d2 Include the most common imports in user.js
No need to split declaration and initialization any more either (?)
2018-07-01 17:52:11 +02:00
Ole Jørgen Brønner 4356128f35 Autofocus new scratch windows if scratch layer already have focus
Or maybe we should do in unconditionally?

An autofocus / noAutoFocus winprop might be useful?
2018-07-01 13:54:22 +02:00
Ole Jørgen Brønner 1240d363a0 Only evaluate winprops on window creation
Doesn't make sense to revaluate each time the window changes workspace.

Also make it easier to control initial focus of scratch windows and removes
side-effects from add_filter.
2018-07-01 13:54:22 +02:00
Tor Hedin Brønner d310553715 minimap: position on correct monitor 2018-07-01 12:26:53 +02:00
Tor Hedin Brønner f783a56940 Ovelays are no longer in the window_group, so don't bother raising 2018-06-30 12:01:06 +02:00
Tor Hedin Brønner 3f381b0c5f edge overlays: Add overlays to the uiGroup
There's no reason to deal with stacking problems of the window_group
2018-06-29 13:56:06 +02:00
Tor Hedin Brønner 2ec4a7afe2 Only run onComplete once 2018-06-29 13:56:06 +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