Commit Graph

49 Commits

Author SHA1 Message Date
Tor Hedin Brønner
02012bc147 liveAltTab: kill unminimize animations manually
In 3.34 there's no _blockAnimations check, so we just set the correct
coordinates and scale immediately.
2019-10-02 21:26:03 +02:00
Tor Hedin Brønner
8daee7ce38 Remove transition from tween calls 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
c0eb491efa liveAltTab: fix quick alt-tab in 3.34
_finish will now call destroy itself if the popup isn't yet visible:

12ec5d1cbe
2019-09-10 00:12:28 +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
Ole Jørgen Brønner
95b6cd673d liveAltTab: only show TabList.NORMAL windows
Non-normal windows are unfocusable or request `mw.skip_taskbar`
2019-08-24 10:02:54 +02:00
Ole Jørgen Brønner
c7c4e6d048 Bugfix: liveAltTab clones positioned wrong on multimonitor setups 2019-05-06 21:53:45 +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
004e2e1e11 Remove blur, 3.32 makes things wonkey 2019-03-24 03:50:52 +01:00
Tor Hedin Brønner
073986344a Polyfill GObject.registerClass
Register the WorkspaceMenu and LiveAltTab
2019-03-24 03:49:36 +01:00
Tor Hedin Brønner
621b7b728f Port to class in preparation for 3.32
see:
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361

TODO: port the LayoutManager in minimap.js, though it looks like gjs won't
deprecrate Lang.Class yet, so it's probably fine to keep using it for now.
2019-03-24 03:49:36 +01:00
Tor Hedin Brønner
35173d0d12 navigator: release keyboard before doing anything complicated
This will prevent users getting stuck in a keyboard trap.
2019-02-27 22:42:52 +01:00
Ole Jørgen Brønner
6fdf1fe2f6 liveAltTab: run moveDone directly
Needed when the `to` window is in the scratch. In that case focus_handler
doesn't cause a moveDone.

The most obvious effect (X11) of not calling moveDone is that the background is
still tracked and the scratch window is thus unresponsive (ref: #80). It
also makes the tiled windows unresponsive to the first click since the window
actors will be hidden (wayland too I think) - the tiling will pick up the click
and activate the clicked window though.
2019-02-26 22:26:32 +01:00
Tor Hedin Brønner
ce9416a55d liveAltTab: Don't allow actions while alt-tabbing 2019-02-24 12:06:05 +01:00
Tor Hedin Brønner
f06b3b6bb0 liveAltTab: only reverse if we start with shift 2019-02-22 11:13:39 +01:00
Tor Hedin Brønner
5d9f3d59e4 liveAltTab: instant preview 2019-02-22 11:13:39 +01:00
Tor Hedin Brønner
3c22876180 alt-tab: let shift-super-alt select most recent scratch window
closes #64
2018-11-26 17:50:56 +01:00
Tor Hedin Brønner
145a8d3347 Polyfill global.workspace_manager 2018-08-27 20:33:34 +02:00
Tor Hedin Brønner
6008051a39 liveAltTab: basic integration with actions 2018-07-18 23:08:23 +02:00
Ole Jørgen Brønner
61290f142d Prepare for navigator refactor + refactor switch-left/right/up/down 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner
71b6ee8f56 Unify regular keybinding api an schemaless keybinding api
Try to make it a bit more "action oriented":

  An action exists independently of its binding. It could conceivable be invoked
  by other means too.

Some weirdness from the marriage remain to weed out, but this is a working
stepping stone.
2018-07-06 12:16:37 +02:00
Tor Hedin Brønner
8296ffa786 Avoid killing eg. minimize animations on alt-tab
`_initialSelection` happens after pushModal possibly fails preventing proper
clean up.
2018-06-01 17:02:36 +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
d27024c12d refactor: ensure_viewport(s, w, f) -> ensureviewport(w, s, f)
Make passing space optional
2018-04-22 15:01:57 +02:00
Tor Hedin Brønner
f840387d70 liveAltTab: Block un/minimize animations
When alt-tabbing to a scratch window we do an instant preview. Focusing the
window would then trigger an un-minimize animation which would look weird.
2018-04-22 14:57:10 +02:00
Tor Hedin Brønner
6368857b6b liveAltTab: clean up 2018-04-22 14:57:10 +02:00
Tor Hedin Brønner
1d8af9cc97 Move previewWorkspace to navigator 2018-04-12 17:00:26 +02:00
Tor Hedin Brønner
769142f727 Repurpose the activity label as a worspace indicator
Introduces a topbar module.
2018-04-04 13:39:41 +02:00
Ole Jørgen Brønner
f3eb2b7b88 Fix change-workspace abort
Pressing <meta>-ESC will now abort workspace changes the same way window changes
are aborted

Probably fixes #37 too (untested since <super>-TAB is restricted to active workspace
atm.)
2018-03-29 14:53:59 +02: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
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
ba0642acd0 liveAltTab: Only show scratch windows when scratch layer is focused 2018-01-10 21:51:03 +01:00
Tor Hedin Brønner
8bc50b4eb1 liveAltTab: Always clean up any clone 2018-01-07 10:12:37 +01:00
Tor Hedin Brønner
059cd66067 liveAltTab: Add live previews of scratch windows
Make a clone of pseudo focused scratch windows which gets pushed to the
top (Can't use raise as it would mutate the stack level).
2018-01-07 08:34:50 +01:00
Tor Hedin Brønner
3d2e86fe11 Use custom action for live alt tab
We kill the regular actions which uses super-tab (and super above_tab, which is
strictly not necessary).

NB: Require schema compilation.
2017-12-08 09:44:03 +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
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
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
e260fc25b7 Always pass an owner object to dynamic_function_ref
This way we can remove a bunch more globally declared variables.
2017-10-27 21:03:53 +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
ee4b30f90c Don't look up workspace_index on _previewWorkspace
fixes #38 Removing workspaces while the multimap is active can cause crashing
2017-10-25 18:50:30 +02:00
Tor Hedin Brønner
dd5545d3c7 Move spaceOf to spaces.spaceOfWindow 2017-10-25 17:01:32 +02:00
Tor Hedin Brønner
4f6330c025 Always force previewWorkspaceDone on finished alt tab
If we've previewed a workspace and then move onto another window in the same
workspace `_finish` will trigger a new workspace animation that we aren't
cancelling.
2017-10-23 11:53:41 +02:00
Ole Jørgen Brønner
2021b584e4 Put scratch windows first in LiveAltTab (when scratch is active)
(in scratch windwo MRU order of course)

Ideally the scratch layer would somehow mutate the MRU itself on
activation, but it seems the only way to do this is to actually focus
the windows in turn. That might be slowish(?) and also messes with the
stacking order (I think). Ie. would need to restore the stacking order
after doing the focus dance.
2017-10-19 18:16:57 +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
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