Commit Graph

1176 Commits

Author SHA1 Message Date
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
Ole Jørgen Brønner
b5fdb1b119 focusMonitor: don't crash on display.focus_window == null
Can sometimes happen on enable (eg. when unlocking screen)
2019-01-11 19:25:00 +01:00
Tor Hedin Brønner
63e74ada44 cleanup: remove spammy logging 2019-01-11 18:59:38 +01:00
Tor Hedin Brønner
c349c10c07 Transforms break on 0 sized actors...
eg. transform_stage_point will simply return `[false, 0, 0]`.
2019-01-11 18:57:02 +01:00
Tor Hedin Brønner
00f7b05ad2 insertWindow: inherit clone position if animating
This makes eg. takeWindow smooth if stopped in the middle of animation.
2019-01-11 17:12:31 +01:00
Tor Hedin Brønner
d3e6e6ff61 edgeoverlays on-enter: only act on the target window 2019-01-11 17:12:31 +01:00
Tor Hedin Brønner
8deb96014e bug fix takeWindow: don't reset the taken windows 2019-01-11 17:12:31 +01:00
Ole Jørgen Brønner
56aeffc4a3 readme: add "recommended extensions" section 2019-01-10 20:58:53 +01:00
Ole Jørgen Brønner
6ed174e0ce Fade selection when scratch layer has focus 2019-01-10 20:48:51 +01:00
Ole Jørgen Brønner
b01d21484f Bugfix: Tolerate removal of monitor while extension is disabled
NPE in setMonitor if old monitor was gone on enable.

Eg. suspend, disconnect monitor, resume
2019-01-10 19:24:29 +01:00
Ole Jørgen Brønner
9287b349df Bugfix: toggle-maximize-width was broken for multimonitor configuration
Note: unmaximize is still broken if the window moved between monitors..
2019-01-10 17:33:30 +01:00
Tor Hedin Brønner
c8603d961a edgeoverlays: make it possible to mouse resize full width windows
Make sure the overlay is always at least 1 pixel wide, otherwise just cover the
windows at the edges.
2019-01-10 17:12:34 +01:00
Tor Hedin Brønner
75e66de782 keybind: super-t take window and place at final destination
This also fixes the rather strange behavior of super-ctrl-above_tab which
actually didn't move to the previous workspace.
2019-01-09 11:51:04 +01:00
Tor Hedin Brønner
98f1e02646 navigator: make getNavigator work in 'destroy'
Also emit success status.
2019-01-09 10:13:24 +01:00