Commit Graph
141 Commits
Author SHA1 Message Date
Tor Hedin Brønner e48943cc8e Add panel in/out animation 2017-09-21 01:13:37 +02:00
Tor Hedin Brønner 24b67ccab3 Fix statusbar regression
Main.layoutManager.panelBox is the correct way to reference the panel when
checking if it's visible or not.
2017-09-21 00:38:29 +02:00
Tor Hedin Brønner b6cfd0eefd Add local install script 2017-09-20 16:06:44 +02:00
Tor Hedin Brønner 1de31e365a Working extension
Regression: enable() is run too early to find the topbar the way we did it
before. Commented out the statusbar.visible handling, and hardcoded the height
for now.

TODO: find a signal we can use to find the topbar properly.
2017-09-20 15:58:02 +02:00
Tor Hedin Brønner 85fc37f617 Explicitly add all dependencies 2017-09-20 15:19:17 +02:00
Tor Hedin Brønner ab1c99da01 Add bare bones necessary files for extension packing 2017-09-20 14:52:44 +02:00
Tor Hedin Brønner 769891f9b2 Move _repl to own file 2017-09-20 13:32:27 +02:00
Tor Hedin Brønner b48b7ef3de Move global preferences to the top 2017-09-19 11:20:26 +02:00
Tor Hedin Brønner 778ec72b2c Give margin the sensible name stack_margin 2017-09-19 10:51:29 +02:00
Tor Hedin Brønner 299bab0bbd Update path 2017-09-19 10:36:30 +02:00
Ole Jørgen Brønner cdc40e82f6 Some comments on window positioning 2017-09-18 20:07:19 +02:00
Tor Hedin Brønner 6ca2e102b1 Make fresh workspaces work better
When there's enough screen width to fit all windows, make them share the
available space evenly.

NOTES:

This does NOT set the currently ensuring window, and does an ugly early return.
2017-09-18 19:54:31 +02:00
Tor Hedin Brønner e0b37b62e6 Remove obsolete global variable overlap 2017-09-18 18:57:34 +02:00
Ole Jørgen Brønner 458a1e5a9f Don't wrap around in PreviewedWindowNavigator 2017-09-18 17:21:45 +02:00
Ole Jørgen Brønner 7a215149cf Debug utils: print stacktrace and allow mulitlines debug messages
Encode newlines using non-breaking space.

Don't unconditionally encode newlines though since it the debug script must be
used to decode them.
2017-09-18 12:13:44 +02:00
Ole Jørgen Brønner e0381329fc Disable debugging messages from PreviewedWindowNavigator
Change the debug filter to allow exclusion, not just inclusion.
2017-09-18 10:20:38 +02:00
Tor Hedin Brønner 3f880f0d35 Don't tile NORMAL transient windows 2017-09-18 09:58:45 +02:00
Ole Jørgen Brønner 007492e600 Bugfix: PreviewedWindowNavigator ensured wrong window sometimes
To reproduce:
- activate the popup
- move the pointer over an entry
- use the keyboard to select another entry

On modifier release the keyboard-selected window get focus, but the mouse/pointer
hovered window is ensured.

Not sure why item-enter (hover) is triggered since the pointer already has
entered that item, but this is a workaround. Even if the pointer was required to
move the situation could probably be triggered by actually moving the pointer
while releasing the modifier key.
2017-09-18 09:45:29 +02:00
Tor Hedin Brønner ca35d79960 Fix crash in _finish in preview 2017-09-18 09:00:13 +02:00
Ole Jørgen Brønner 591cc20a69 Notes: How to get a stacktrace in gjs 2017-09-17 22:26:21 +02:00
Tor Hedin Brønner 575289fdaa Add some missing prints from preview navigator 2017-09-17 22:16:21 +02:00
Tor Hedin Brønner 921af85490 Revert back to easeInOutQuad, looks better at greater speeds
Also rename `easing` to `transition`.
2017-09-17 17:50:58 +02:00
Tor Hedin Brønner b747d60e20 Use easeOutQuad for delayed the delayed window animations
Then we could remove the strange divide by two thing too.
2017-09-17 16:20:07 +02:00
Tor Hedin Brønner a309776f37 Use somewhat proper delay calculation
This should in principle start the animation when the obscuring window have
moved margin - margin_lr frames, which is in the ballbark of what we want.

Had to divide the whole thing by two, not sure why that should've been necessary.

It might be better to use easeOutQuad though, since the other windows are
already moving.
2017-09-17 16:03:35 +02:00
Tor Hedin Brønner e937745a65 Delete obsolete files 2017-09-17 14:20:43 +02:00
Tor Hedin Brønner 4d537d1647 Add license 2017-09-17 14:19:37 +02:00
Ole Jørgen Brønner 996a93b132 Use PreviewedWindowNavigator as primary next/prev action 2017-09-17 11:40:29 +02:00
Ole Jørgen Brønner 2478db8c75 PreviewedWindowNavigator: Don't wrap around when preview not visible 2017-09-17 11:35:31 +02:00
Tor Hedin Brønner adbba75d52 Finally anchor the scaled position _properly_
Set the y pivot based on y_offset so we can specify the visible position of the
scaled window.
2017-09-17 11:21:55 +02:00
Tor Hedin Brønner 85d7dbc93c Use the frame height to calculate scale
This make scaling and positioning windows with different buffer/frame deltas
consistent, and is what we actually want. ie. the height we're interested
setting is the height of the visible window (not the air around it).
2017-09-17 11:05:46 +02:00
Tor Hedin Brønner d66c7129a8 Reduce the chance of windows passing through each other in the z-axis
When going to a scaled window set a tiny delay so the window to the left/right
have time to move out of the way before we `raise` and start the animation. The
animation time is reduced by the delay, so the animations should still finish at
the same time.

This isn't completely robust because it depends on the speed of window to the
left/right moves, which is determine by the width of the window we're ensuring.
2017-09-17 10:40:11 +02:00
Tor Hedin Brønner 770db65389 Use a static scaled height for windows stacked to the sides
This requires controlling the upper left/right most corner depending on which
side the window is stacked, ie. pivot points (0,0) and (1,0) respectively.

TODO: center fullscreen windows properly too
2017-09-17 00:23:18 +02:00
Tor Hedin Brønner 8728a57db7 TODO: make a proper github repo 2017-09-16 20:59:58 +02:00
Tor Hedin Brønner 071768969a Fix: Add a gap properly when opening windows in the background 2017-09-16 20:08:15 +02:00
Ole Jørgen Brønner d369476a9b Bugfix/regression: two quick moves ended in invalid state
Second ensure is cancelled since animation isn't done yet. In effect it looks
like the move wasn't done.
2017-09-16 18:59:13 +02:00
Tor Hedin Brønner 4671d4c8f8 Add print debugging for the PreviewNavigator
Also use `this._switcherList.windows` instead of calling `_getWindowList`
again. (which might fix things, but probably not).
2017-09-16 16:18:50 +02:00
Ole Jørgen Brønner f52289b5bb Simple winprop system
Based on notion/ion3

'float' and 'oneshot' support atm.
2017-09-16 11:45:57 +02:00
Tor Hedin Brønner 0623284de9 Add debug filtering
Set `debug_all` to `false` and eg. `debug_filter["window-added"] = true` and
you'll only get output which starts with `window-added`
2017-09-15 21:45:03 +02:00
Tor Hedin Brønner c3e08564c6 Add some convience globals 2017-09-15 19:48:19 +02:00
Ole Jørgen Brønner ede4f10dfa Select journal entries by executable
This will hopefully catch all relevant logs.
2017-09-15 18:46:48 +02:00
Tor Hedin Brønner 9c8986bc25 Only hide the statusbar when we're on a fullscreen window 2017-09-15 16:38:27 +02:00
Ole Jørgen Brønner f252a62204 Notes: (minor) 2017-09-15 14:44:22 +02:00
Tor Hedin Brønner 7d030a40db Support for tiling in new _static_ workspaces
Doesn't work with dynamic workspaces because they doesn't trigger the
`workspace-added` signal.

(Removed some superfluous logging)
2017-09-15 14:39:56 +02:00
Ole Jørgen Brønner 1c0e886bdd Recover tiling order across gnome-shell restart
Notes:
- X11 ids isn't exposed(?) (MetaWindow.get_xwindow C only)
- No other stable id seems to be exposed (get_stable_sequence is not that
  stable)
- Window title is too volatile (must persist order very frequently if used)
- Using the x position and stacking order seems to work (expect for windows that
  take up 100% of the screen width)
2017-09-15 10:59:46 +02:00
Ole Jørgen Brønner 8ea4a9e3cf Remove accidentally added file 2017-09-15 06:59:06 +02:00
Tor Hedin Brønner 38a9c9746a Fix fullscreen position
`PreviewWindowNavigator` scrolling past fullscreen windows work perfectly too :)
2017-09-14 22:12:14 +02:00
Ole Jørgen Brønner 26c8f1ff77 Notes: How gjs imports works 2017-09-14 16:34:13 +02:00
Tor Hedin Brønner d6e021e631 Regression: Don't set margin_lr globally in ensure_viewport 2017-09-14 11:53:13 +02:00
Tor Hedin Brønner 0ac8ba24c3 Don't don't ensure window is in view on first-frame
Only position the new inactive window correctly, we should never move the
focused window without also moving focus, or some explicit move/resize action.
2017-09-14 11:31:56 +02:00
Tor Hedin Brønner a911459b65 Robust initial position via. first-frame signal
`focus` runs before `first-frame` which means we need to set initial position
there to make sure that `ensure_viewport` works correctly.
2017-09-14 11:19:30 +02:00