Tor Hedin Brønner
e4d1226100
focus handling: Add focus handler to all windows
...
Also set selectedWindow in `ensure_viewport`, as this avoids setting
selectedWindow on any windows not in a space.
2018-03-11 19:12:18 +01:00
Tor Hedin Brønner
dbc0a9ce70
Simplify and move focus_wrapper
2018-03-11 19:10:53 +01:00
Tor Hedin Brønner
5b01fbab68
spaces: Simplify structure
...
Make the spaces object a `Map`.
2018-03-11 18:33:22 +01:00
Tor Hedin Brønner
96b395efc3
spaces: Actually use Map
...
Somewhat long standing bug, where we introduced `Map`, but actually just used it
as a regular object.
2018-03-11 18:27:50 +01:00
Tor Hedin Brønner
a7b2bc11ef
Use class for Space, instead of function
2018-03-11 18:16:22 +01:00
Tor Hedin Brønner
e7e24c842d
ensure: Remove delay
...
Since we're now raising the target window immediately there's little use for
this delay.
2018-03-10 23:16:56 +01:00
Tor Hedin Brønner
b26d5fda1a
alt-tab: Restrict to the current workspace
2018-03-10 22:37:32 +01:00
Tor Hedin Brønner
def0d6c47c
isScratchWindow: don't fail on null
...
Silly regression
2018-03-10 22:09:53 +01:00
Tor Hedin Brønner
d80e2eacc6
scratch: Use an explicit marker for floating windows
...
On startup we use a heuristic to figure out which windows should float in the
scratch layer, but from then on we simply check if the window is marked as
floating.
NB: Since `above` is reset when a window is minimized there's no guarantee that
a floating window will be above when visible.
2018-03-10 20:42:00 +01:00
Tor Hedin Brønner
32cca42def
Use makeScratch when adding windows to the scratch layer
2018-03-10 20:21:54 +01:00
Tor Hedin Brønner
cc8cfac71c
add_filter: Add missing startup argument
2018-03-10 19:50:50 +01:00
Tor Hedin Brønner
9c4b53c306
startup: Don't make windows scratch based on current focus
...
This fixes a bug where all windows will be moved to the scratch layer if it's in
focus when doing a restart.
2018-03-07 16:39:37 +01:00
Tor Hedin Brønner
4e5007e544
bindings: Don't overwrite already registered actions
2018-02-26 20:26:33 +01:00
Tor Hedin Brønner
2b6a406071
scratch: Simplify scratch menu
2018-02-26 13:32:13 +01:00
Tor Hedin Brønner
9191f0677f
binding: <super><shift>tab should be reversed
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
47dc3298d7
Bind <super>above_tab to previous-workspace
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
1e3b841f94
Add compiled schema
...
Makes it less likely to trigger crashes due to missing schema keys. Also makes
it easier to install for other people.
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
fa0a0db195
Add scratch window toggle
...
Binding `<Super><Ctrl>Escape>`.
Schema change
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
769b66307d
Load rc file on enable
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
419a7d682c
propagate_forward: x is monitor relative
2018-02-25 10:36:40 +01:00
Tor Hedin Brønner
2ba2f64566
Reset leftOverlay when all windows are visible
2018-02-25 10:36:40 +01:00
Ole Jørgen Brønner
17c4d5ae4b
Notes keybinding system
2018-02-24 22:28:30 +01:00
Tor Hedin Brønner
0177bf6770
Use a windows destination when ensuring it's in view
...
This makes it possible to «peak» by quickly doing `super-<>` or `super-><`.
2018-02-19 07:54:41 +01:00
Tor Hedin Brønner
fc453fb7a7
Automate module init/enable/disable
2018-02-17 21:52:46 +01:00
Tor Hedin Brønner
c0a65058b8
Add a kludge module to monkey patch around gnome shell oddities
2018-02-17 21:52:31 +01:00
Tor Hedin Brønner
4d9c75ca71
Sort the stack by distance and then mru
...
O(`max`*`space.length`) ~ O(`space.length`) for finitely wide screens. Doesn't
seem like there's a large performance penalty to decide ties between
equidistant windows using the mru, instead of deciding ties by sorting on
left/right.
2018-02-17 21:16:27 +01:00
Tor Hedin Brønner
63a223ec32
When all windows are visible always show a minimum margin
2018-02-17 18:49:45 +01:00
Tor Hedin Brønner
20bd85fb9e
utility: Add space as dev global
2018-02-17 18:05:11 +01:00
Tor Hedin Brønner
3c2471cb11
Focus the right neighbour when closing a window
...
Mutter hands focus to the "highest" window when a window is closed. This means
we need to raise windows from the edges in towards the selected window, making
the neighbours of the selected window the next highest windows.
In particular since we propagate backwards last, the right neighbour will get
priority.
2018-02-16 11:45:57 +01:00
Tor Hedin Brønner
918350bf52
setInitialPosition: Place non-focused windows using ensure
...
`move_to` will no longer place the input window on the stack, so instead run
ensure on the `selectedWindow`.
2018-02-07 18:39:03 +01:00
Tor Hedin Brønner
0c494e8cb4
propagate_forward/backward: Remove obsolete lower argument
2018-02-07 18:39:03 +01:00
Tor Hedin Brønner
5216fd9d14
Use 'show' signal instead of 'first-frame'
...
Sometimes initial position bugs out, which might be because 'first-frame'
happens too early. 'show' seems to be more robust.
2018-02-07 18:39:03 +01:00
Tor Hedin Brønner
9dce8f363c
setInitialPosition: Always set the initial position for new windows
...
Since it's too early to set the position on `window-added` we do it in
`setInitialPosition` when the window actor is known to exist.
2018-02-07 18:25:48 +01:00
Tor Hedin Brønner
f811dfdb33
More robust init guard
...
`initCount` would be reset when reloading `extension.js`, this change should
handle those cases.
2018-02-05 23:08:58 +01:00
Tor Hedin Brønner
ec5c54bb49
Fix broken alt-tab binding after gdm lock
...
For some reason locking the screen with GDM kills the live-alt-tab binding.
2018-02-05 17:54:47 +01:00
Tor Hedin Brønner
32a53002f5
ad-hoc height fix: maximize height on ensure
...
This makes things usable on wayland.
2018-02-03 18:12:48 +01:00
Tor Hedin Brønner
b1b5ce8f9a
Avoid crashing on wayland
...
Resizing `MetaWindowWayland` typed windows this early causes gnome shell to
crash.
2018-02-03 17:52:14 +01:00
Tor Hedin Brønner
d9af00df4a
Fix typo
2018-02-03 10:46:41 +01:00
Tor Hedin Brønner
4e04bf0902
stackoverlay: 0 is falsy so can't use ||
...
If destinationX is `0` it will incorrectly be regarded as false.
2018-02-01 12:26:53 +01:00
Tor Hedin Brønner
78449a9f28
Fix complaints about negative width in the logs
2018-02-01 12:06:38 +01:00
Tor Hedin Brønner
44ce70b820
stackoverlay: Enable fast clicking on edges
...
With the two previous commits we can now safely remove the `restacked` signal
watching. For some reason watching the signal is this way blocks clicks while things are
moving.
So now it's possible to eg. doubleclick on the left/right edge and jump
two places.
2018-02-01 07:52:47 +01:00
Tor Hedin Brønner
f6d9429dbc
stackoverlay: Use destination when deciding stack placement
2018-02-01 07:40:11 +01:00
Tor Hedin Brønner
96d422fe65
Update the stack overlay before animation
...
We set the target after setting starting all animations so the calculations are
correct, though this doesn't seem to work for some reason.
2018-01-31 17:31:54 +01:00
Tor Hedin Brønner
79245c09d8
Remove ad-hoc stack level fix
...
This is no longer necessary as we now raise windows when we know if they will be
visible after animation, which is much better than after animation is finished.
2018-01-31 17:31:54 +01:00
Tor Hedin Brønner
019f997c24
Move left/right stack logic to ensure and propagate functions
...
When we propagate the position forward/backward we check the desired position
against the left/right limits and stack the rest of the windows if it's the
case.
This also fixes the stack performance issue in a cleaner way. We simply raise
all non-stacked windows while propagating, instead of doing a fix-up afterwards.
2018-01-31 17:31:07 +01:00
Tor Hedin Brønner
6af4314e14
Add stackWindow function
...
Make it easy to move left/right stacking out of `move`.
2018-01-31 16:25:54 +01:00
Tor Hedin Brønner
a894552439
workspace preview: Don't imply a specific spatial layout
...
When navigating workspaces in mru order animating the workspaces based on the
mru order gives a false sense of spatiallity. Instead simply animate the
previewed workspace from the bottom and animate the last workspace down.
2018-01-31 14:25:53 +01:00
Tor Hedin Brønner
b338f7372e
fixStackLevels: Handle empty right stacks
...
When the right stack was empty the former function wouldn't loop to and raise the
last visible window.
2018-01-31 07:43:26 +01:00
Tor Hedin Brønner
a3e597b36c
Refactor fixStackLevels out of ensure_viewport
2018-01-31 07:37:57 +01:00
Tor Hedin Brønner
60fd6876de
topOfRight/LeftStack: Don't depend on selectedWindow
...
`selectedWindow` isn't necessarily a visible window, eg. when we're doing
previews, so just do a search from the start/end up until we find the last
stackd window.
2018-01-30 19:12:28 +01:00