Commit Graph
1189 Commits
Author SHA1 Message Date
Tor Hedin Brønner 450359cd8a Make pressure barrier optional (false by default for now)
Set to false until we can figure out a good way to get it to work for multiple
monitors.
2019-03-02 18:29:42 +01:00
Tor Hedin Brønner 1ca729dc8a edge overlay: delay previews a tiny bit
This should prevent triggering previews when going across the overlay.
2019-03-01 12:19:53 +01:00
Tor Hedin Brønner 945e4cb895 switch workspace: init the workspace stack if it isn't already done 2019-02-27 22:42:52 +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 9c702ecba2 scratch: always position scratch windows on focus monitor 2019-02-27 22:41:10 +01:00
Ole Jørgen Brønner 2174981cfc scratch: remember previous "scratch geometry" and restore it on detach 2019-02-27 22:41:00 +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 c80a8fd7eb workspace label: pick up the correct css for the label
A bit ad-hoc, but should work correctly.

The idea is picking up css rules with this selector:
 `#panel .panel-button StLabel`
2019-02-24 14:33:18 +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 d7215ba0e1 ensureViewport: prefer last focused position when appropriate 2019-02-22 11:13:39 +01:00
Tor Hedin Brønner 97a7d36781 Refactor ensuredX out of ensureViewport 2019-02-22 11:12:29 +01:00
Tor Hedin Brønner 6cf0309b1d workspace label: simplify position logic 2019-02-22 11:07:37 +01:00
Tor Hedin Brønner 64b9ffbca8 readme: fix git clone instructions 2019-02-21 11:36:51 +01:00
Tor Hedin Brønner 5f20007ff2 workspace label: react to changes in top bar font changes 2019-02-20 11:15:14 +01:00
Tor Hedin Brønner 48adf04ae7 workspace label: set explicit height
ref #95
2019-02-19 14:02:02 +01:00
Tor Hedin Brønner adcfa414ad preference: add use-workspace-name switch
Defaults to true. If false uses gnome shell's `Activities` text and hides the
workspace labels.

Set to false like this:
```
Extension.imports.convenience.getSettings()
  .set_boolean('use-workspace-name', false)
```
2019-02-15 00:15:54 +01:00
Tor Hedin Brønner c4163c4caf settings: handle state generically 2019-02-14 19:25:35 +01:00
Tor Hedin Brønner 81551d591a Use monitor's workarea to position windows
When eg. using dash-to-dock without autohide we would position windows under the
dock. Use the workarea instead of the monitor to figure out where we can
position windows.

TODO: re-layout on `display::workareas-changed`, unfortunately this is triggered
when focusing a fullscreen window, so we'll need to keep track of the workareas
ourself to make it performant. For now the user will have to «rejigger» the
windows manually.

closes #94
2019-02-14 16:32:33 +01:00
Tor Hedin Brønner 5456036e69 edge: Put into window group
This fixes a rather annoying bug where we're not able to interact with windows
floating above the edge overlays. (doesn't work on X11 I think).

It also makes the interaction with a fixed dock on the edges better.
2019-02-14 16:30:59 +01:00
Tor Hedin Brønner 1c5f5d9bad pressure barrier: position on monitor edges until workarea is fixed 2019-02-12 23:52:47 +01:00
Tor Hedin Brønner 98ea1ccb9b edge: Allow moving the pointer to other monitors after pressure
Mostly taken from dash-to-dock.

We remove the edge barrier after pressure is triggered, allowing the pointer to
move across monitors.

ref #94
2019-02-12 21:23:15 +01:00
Ole Jørgen Brønner 09950f20a2 Cleanup: MetaWindow have a built-in 'is_override_redirect' method 2019-02-10 14:32:58 +01:00
Tor Hedin Brønner 0c5458a38a workspace menu label: fix width
Taken from gnome-shell's css files.
2019-02-09 16:53:57 +01:00
Tor Hedin Brønner d7336e95fd Fix workspace label position 2019-02-08 19:32:12 +01:00
Tor Hedin Brønner dc970771d7 installer: make sure the gnome shell extensions dir exists 2019-02-06 20:49:06 +01:00
Tor Hedin Brønner 2546b0d9e3 edge overlays: On fullscreen, only show with applied pressure 2019-02-05 10:39:26 +01:00
Ole Jørgen Brønner 22b1a717f0 prefs: better keybinding search 2019-01-26 21:12:39 +01:00
Ole Jørgen Brønner 7aee0d901c Redirect extension prefs windows to scratch layer (winprop)
X11: A regular intermediate window is created before the actual prefs dialog.
This cause trouble - it's inserted shortly into the tiling.
Wayland: The prefs dialog is opened as a regular window

We'd like the prefs dialog (at least our own) to float.
2019-01-26 21:05:05 +01:00
Ole Jørgen Brønner e268e9ac11 Move winprop related code to settings.js
(leave a shim for backward compatibility)
2019-01-26 21:04:50 +01:00
Ole Jørgen Brønner 571a2d0680 Don't show actors of minimized scratch windows
Specifically fixes bug where whole scratch layer become visible (but only the
actors) when reloading (or disable/enable cycle) when at least on scratch window
was active.

This also sometimes crashed gnome-shell (confirmed on v3.28.3 - ubuntu 18.04)

Also remove some code who seem to partly work around the problem
2019-01-26 14:05:09 +01:00
Ole Jørgen Brønner 19dd7b7ea2 Prevent clicks from reaching non-placable windows (X11)
When window_gap is largish it was possible to click on the non-placable
metawindow (between the stackoverlay and the neigbour window) - triggering #80.

L: left non-placable (clone)
R: right non-placable (clone)
G: gap/2
A/B: placable window

LGGAA..BBBGGR

Allocate `LGG - "guaranteed-resize-edge-width"` to the stackoverlay to ensure
it's impossible to click on the non-placable window below.

Ideally we'd only allocate L or maybe LG to the overlay. Note: We could add
special logic for wayland since #80 only affects X11.
2019-01-20 15:16:36 +01:00
Tor Hedin Brønner cf5df363bf bug fix: always cover non placeable windows with overlay fully
fixes c8603d961a
2019-01-20 14:44:00 +01:00
Tor Hedin Brønner 86b357865f readme: improve install instructions
In particular make it clear that the extension needs to install with the uuid as
the name.

Also do some light touch ups.
2019-01-20 14:17:34 +01:00
Tor Hedin Brønner 554ac341cb workspace menu: use standard gtk-preference icon 2019-01-18 18:48:56 +01:00
Tor Hedin Brønner 187f6ee9cb Only toggle the most recent window on super-escape
super-shift-escape toggles the whole layer.
2019-01-14 18:22:57 +01:00
Tor Hedin Brønner a76bf3f2c8 edgeoverlays: react to button release
This is good practice as it gives the user a way to «undo» the action by moving
the pointer away.
2019-01-13 15:10:14 +01:00
Tor Hedin Brønner 5d45f5f1aa topbar: fix button handling when menu is open 2019-01-13 15:08:27 +01:00
Tor Hedin Brønner 3ed41c0942 prefs: add preference button to workspace menu 2019-01-13 15:08:27 +01:00
Tor Hedin Brønner fc399526ff prefs: Fix unamed workspace names 2019-01-13 15:08:27 +01:00
Tor Hedin Brønner f61d194487 fix bug: actually splice out the window 2019-01-13 12:42:40 +01:00
Ole Jørgen Brønner 6a4e0f661f prefs: support starting at a specified workspace
In preparation for "go-to-settings" button in workspace context menu
2019-01-13 11:54:43 +01:00
Tor Hedin Brønner b2f30396b8 Use the clones' stack order to pick the top window
We need to raise one of the focused window neighbours preemptively to get sane
focus after closing a window (ie. one of the neighbours should always get
focus).

However we also use the windows' stacking order to decide eg. which window in
a vertical tiling to select when entering from the side. Raising the neighbours
on focus can easily break this behavior, as the top window no longer is the most
recently selected.

If we use the clones stacking order instead we avoid these issues as it's
unaffected by the unavoidable window raising we do on focus.
2019-01-13 10:40:17 +01:00
Tor Hedin Brønner ef8c8a0df6 registerWindow: fix names, and set meta_window on metaWindow.clone 2019-01-13 10:34:15 +01:00
Ole Jørgen Brønner 8e025a39eb prefs: Fix harmless NPE
When an action have no keybindings its empty row doesn't have "COLUMN_INDEX"
-1. (changing that breaks other things)
2019-01-13 08:36:44 +01:00
Tor Hedin Brønner 33431ce808 bug fix: place windows correctly when unmaking scratch
For some reason setting the clone's position before layout doesn't work.
2019-01-12 22:02:33 +01:00
Tor Hedin Brønner a890ffc406 minimap: don't show highlight on empty workspace 2019-01-12 18:35:17 +01:00
Ole Jørgen Brønner 41a5028b61 Determine focused window in absence of display.focus_window
When a new window is created from the overview [1], `display.focus_window` is
null. This broke our "should-window-be-scratch" logic.

Behavior observed both on X11 and wayland

[1] or the 'switcher' extension. Probably in general if a shell modal is active
when the window is created?
2019-01-12 11:34:09 +01:00
Tor Hedin Brønner ac49cbac98 prefs: fix typo... 2019-01-11 20:33:20 +01:00