Commit Graph

73 Commits

Author SHA1 Message Date
Tor Hedin Brønner
a48e013395 Add ClickOverlay class 2018-04-30 00:03:08 +02:00
Tor Hedin Brønner
ddc0a29861 stackoverlay: Take monitor as an argument
Also place the left overlay correctly at monitor.x
2018-04-30 00:03:08 +02:00
Tor Hedin Brønner
7dd2883830 Add StackOverlay.reset()
Also reset the overlay when we're done with navigation. It would hang around
when switching to a blank workspace.
2018-04-23 11:17:40 +02:00
Tor Hedin Brønner
95cff98230 Position and size the stackoverlay using gap and margin preferences
Extend it to the bottom of the screen so the bottom corners can be used to
switch windows though.
2018-04-23 09:25:25 +02:00
Tor Hedin Brønner
b42adca37c Always cover fullscreen windows in stackoverlay 2018-04-22 15:01:57 +02:00
Tor Hedin Brønner
6bd47b4bf4 Hook up the stackoverlay again
This also fixes an regression where the left/right decision would use the
wrong `destX` value.
2018-04-22 15:01:57 +02:00
Tor Hedin Brønner
4e04bf0902 stackoverlay: 0 is falsy so can't use ||
If destinationX is `0` it will incorrectly be regarded as false.
2018-02-01 12:26:53 +01:00
Tor Hedin Brønner
78449a9f28 Fix complaints about negative width in the logs 2018-02-01 12:06:38 +01:00
Tor Hedin Brønner
44ce70b820 stackoverlay: Enable fast clicking on edges
With the two previous commits we can now safely remove the `restacked` signal
watching. For some reason watching the signal is this way blocks clicks while things are
moving.

So now it's possible to eg. doubleclick on the left/right edge and jump
two places.
2018-02-01 07:52:47 +01:00
Tor Hedin Brønner
f6d9429dbc stackoverlay: Use destination when deciding stack placement 2018-02-01 07:40:11 +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
1ef583dfd1 disable/enable: Fully disable stackoverlays
Also just have an enable/disable function in the stackoverlay module.
2017-12-01 21:23:13 +01:00
Tor Hedin Brønner
2030138ee7 disable: Disconnect the stack overlays 2017-12-01 06:58:49 +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
fb360b5695 Everything but primary and spaces should be local now 2017-10-27 21:32:18 +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
d9d3ab3241 Make stack_margin local 2017-10-27 21:16:32 +02:00
Tor Hedin Brønner
dd5545d3c7 Move spaceOf to spaces.spaceOfWindow 2017-10-25 17:01:32 +02:00
Ole Jørgen Brønner
bd8f2c6fee Keep an explicit "isStacked" flag on metawindows + stackoverlay fixes
onCompleted of the tween of the active window didn't always finish before all
other windows was done animating (seemingly at least). This caused a wrong
overlay position/width since it used `is_scaled` to find the top of the stack.

In general it's probably useful to be able to know which windows are stacked
before animations are done. Windows might be scaled for other reasons too.

Also fixes a bug where the left overlay was active even though the neighbor
fully obscured the left stack. (that caused a small region of the left most
unstacked window to unresponsive). (due to setting negative width being a noop)
2017-10-19 14:51:46 +02:00
Ole Jørgen Brønner
69f456d1fb Bugfix: this/that 2017-10-18 13:40:55 +02:00
Ole Jørgen Brønner
037a3394fb Size and position stack overlay exactly above the _visible_ portion of the stack
We have to do this since mutter/gnome-shell does not account for stacking order
when handling mouse input. Ie. the overlay region ask to receive mouse input
from mutter. It does this even when it's below a window actor. (Only affects
X11, not wayland)
2017-10-18 13:27:13 +02:00
Ole Jørgen Brønner
e84e2d93e3 Working stackoverlay (incl. semi-broken icon support)
Turned out to be a bit more difficult than expected to make icons
visually pleasing. Mainly during animations. Icons are thus disabled.

Problems:
- The overlay prevents the cursor from changing shape to "resize" when
  hovering the left/right side of the left/right-most non-stacked
  window. It still works to resize though.
- Icon support semi-broken and ugly during transitions.

Ref: #10
2017-10-18 13:27:13 +02:00
Ole Jørgen Brønner
8a63404c1e Proof of concept: stackoverlay
Some code to manually create overlays

Ref: #10
2017-10-18 13:27:13 +02:00