Commit Graph
245 Commits
Author SHA1 Message Date
Ole Jørgen Brønner e0e1e624ec Experimental stuff 2017-10-02 17:17:16 +02:00
Tor Hedin Brønner b5af3c2017 Only ensure if the window is part of the space 2017-10-01 16:50:15 +02:00
Tor Hedin Brønner 2bee270ccf Just scale the top bar down, don't hide it, when ensuring
This prevents the hide signal being triggered and doing the wrong thing while
previewing a fullscreen window while `selectedWindow` is non-fullscreen.
2017-10-01 14:45:41 +02:00
Tor Hedin Brønner 5beb29fa1b Override panel hiding when selectedWindow isn't fullscreen 2017-10-01 13:16:22 +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
Ole Jørgen Brønner a08d6e0be7 Some development utils: eg. update global variables command: Super-Insert
+ A function to visualize the window boxes (frame_rect and buffer_rect)
2017-09-29 16:09:40 +02:00
Tor Hedin Brønner fd9dd50383 Only set ensure selectedWindow if there's windows in the workspace
This broke enable and further initalization.
2017-09-29 14:52:58 +02:00
Tor Hedin Brønner e530addb5e Leftover x_offset in fold 2017-09-28 15:21:14 +02:00
Tor Hedin Brønner 8238d487c6 Put the WindowActor clone inside a St.Widget for style and position 2017-09-28 14:23:50 +02:00
Tor Hedin Brønner 3500089e8d Fix typo 2017-09-28 13:37:09 +02:00
Ole Jørgen Brønner 0269af8aee stylesheet.css
And a placeholder style for selected window in minimap.

The extension system load this file automatically. Simply set the class on a st
widget to use:

    new St.Bin({ style_class: "paper-mm-selected-window"});

The border is part of the width though (box-sizing not supported I think) so
if we're going to use borders directly around the clone some adjustment will be
needed to keep 100% aligned with the actual space.
2017-09-28 13:29:11 +02:00
Ole Jørgen Brønner 91e0f5e978 Naming: createMinimap -> Minimap
(constructor style)
2017-09-28 11:52:45 +02:00
Ole Jørgen Brønner f1d9fdca6e Space.selectedIndex util method 2017-09-27 23:02:56 +02:00
Ole Jørgen Brønner 0c9034255d Don't repopulate minimap when hiding it 2017-09-27 23:02:56 +02:00
Tor Hedin Brønner 7656af1138 Always show the panelbox when selecting non-fullscreen windows 2017-09-27 22:46:23 +02:00
Ole Jørgen Brønner a8bce1885b Lay out the minimap on toggle 2017-09-27 21:58:42 +02:00
Ole Jørgen Brønner 490a1afbd0 Repopulate minimap on toggle
ref: #33
2017-09-27 21:49:55 +02:00
Ole Jørgen Brønner d7fa57592c (empty) Minimap for all spaces!
Not hooked up to 'window-added/removed' so the map will be empty.
2017-09-27 21:26:08 +02:00
Tor Hedin Brønner 75220ee83d Set a max protrusion when folded
Also use frame coordinates
2017-09-27 20:11:07 +02:00
Tor Hedin Brønner e6af7c7a41 Basic fold with tons of hardcoded values
ref: #33
2017-09-27 19:46:35 +02:00
Ole Jørgen Brønner 9be97a5f36 Minimap prototype
NB: Only one workspace supported

Ref: #33
2017-09-27 18:43:53 +02:00
Ole Jørgen Brønner 5c28deb0e4 Copy-paste bugfix
(untested)
2017-09-27 14:35:35 +02:00
Ole Jørgen Brønner 17053b2ab5 Don't position windows on non-integer pixel positions
Results in blurry content.

Maybe we want to enforce this in `move`/`move_to` too?
2017-09-27 13:15:35 +02:00
Tor Hedin Brønner b6447a2f4c Use minimum for delay calculation
Returns NaN when margin_lr is largen than stack_margin obviously.
2017-09-27 13:08:24 +02:00
Tor Hedin Brønner a6e646127b Make a minimumMargin property for maximize and ensure
Maximize using `minimumMargin` so a high `margin_lr` will not interact with
maximize. Also use it to determine if a window should be pushed into the
viewport using the regular horizontal margins.

(Also let `primary` be a global, it breaks eval of basically everything)
2017-09-27 11:55:00 +02:00
Tor Hedin Brønner 77a4e432d4 Position the first window on a workspace correctly 2017-09-26 15:28:03 +02:00
Tor Hedin Brønner c4f14d495e Remove alignment on animation overwrite
Caused some weirdness when going back and forth fast, and didn't seem to do
anything useful.
2017-09-26 14:31:48 +02:00
Ole Jørgen Brønner ced00ebcb3 Don't enable() more than once. Workaround until disable is implemented
The extension sometimes go through multiple init -> enable -> disable cycles at
login or gnome-shell-restart.

This is especially problematic as we don't yet implement `disable`. Note that
`init` is **also** called multiple times when this happens..

Fixes #30
2017-09-26 13:30:37 +02:00
Tor Hedin Brønner 2964ab3d90 Use setInitialPosition for positioning existing windows too
Also set update `selectedWindow` correctly.
2017-09-26 13:28:25 +02:00
Tor Hedin Brønner 555cf7fe6b Hook up focus_wrapper on first-frame for new windows
This properly fixes the raciness between `setInitialPosition` and
`ensure_viewport` on first `focus`.

Also positions new focused windows properly by moving the frame before we
ensure.
2017-09-26 12:57:47 +02:00
Tor Hedin Brønner 0e182d6b1d Use move_to for initial positioning
Makes opening windows in the background less jumpy, eg. when emacs starts its
position at the left of the screen for a moment before jumping to it's initial
position.
2017-09-26 11:22:19 +02:00
Tor Hedin Brønner 7f9f43b5b0 Refactor setInitialPosition out of first-frame and focus
A bit hacky, but seems to work, and will actually clean up after itself (the old
disconnect didn't work as we know).
2017-09-26 00:35:38 +02:00
Tor Hedin Brønner 9b5f4e0a4a Refactor insertWindow out of add_handler 2017-09-25 18:47:22 +02:00
Tor Hedin Brønner 89f4cf9f3d Align the window frame to the actor when overwriting animations
Should decrease jumpiness
2017-09-25 18:09:38 +02:00
Tor Hedin Brønner 393339fa5a Fix silly regression, wrong argument ordering 2017-09-25 18:01:28 +02:00
Tor Hedin Brønner 7282d3ef79 Shouldn't be necesarry to force here
It might have caused some jumpiness on early release, though not sure how.
2017-09-25 15:52:39 +02:00
Tor Hedin Brønner fe9c2bb9e3 Remove obsolete code
Navigation and moving is handled by `PreviewedWindowNavigator` now.
2017-09-25 14:43:11 +02:00
Tor Hedin Brønner 6f4a77e4bc Also set selectedwindow on restart 2017-09-25 13:49:08 +02:00
Tor Hedin Brønner f25a023047 Run relayout on restart 2017-09-25 11:56:18 +02:00
Tor Hedin Brønner 4c6456df18 When adding scratch windows make them above 2017-09-25 11:49:53 +02:00
Tor Hedin Brønner d2b8e5771b Only force ensure when we reorder the space 2017-09-25 11:17:54 +02:00
Tor Hedin Brønner c215761b7c Refactor move_to out of ensure_viewport
Use `move_to` when adding already existing windows to a workspace.
2017-09-25 11:05:17 +02:00
Tor Hedin Brønner cc9d59c6ea Refactor ensure_viewport to take an explicit space argument 2017-09-25 11:05:17 +02:00
Ole Jørgen Brønner 37731b7cc6 Notes: More keybindings (eg. modifier-only keybindings) 2017-09-25 00:15:41 +02:00
Tor Hedin Brønner 269d91bc07 Fall back to focus_window when selectedWindow isn't set
`selectedWindow` won't be set when we restart.
2017-09-24 23:42:54 +02:00
Tor Hedin Brønner db19967416 Use space.selectedWindow to pick the starting point of navigation
This makes it possible to navigate the tiling while the scratch layer is
focused.
2017-09-24 22:32:58 +02:00
Ole Jørgen Brønner 9f8438e1e0 Remove obsolete LiveWindowNavigator
Superseded by PreviewedWindowNavigator. We don't need both, and if want
navigation without minimap we can just make a flag
2017-09-24 20:44:04 +02:00
Tor Hedin Brønner c4439cdaa6 Declare margin and gaps in schema
Makes it possible to customize in dconf.
2017-09-24 20:39:38 +02:00
Ole Jørgen Brønner 6eaa8333f9 Use hardcoded actions in PreviewedWindowNavigator 2017-09-24 20:33:21 +02:00