Commit Graph
1375 Commits
Author SHA1 Message Date
Tor Hedin Brønner c8dfaacb42 layout: Do not run any auto corrections when grabbing
NOTE: `animate` is false when grabbing. In general auto will cause an animate so
we disable it in the somewhat more general case.
2019-10-17 23:07:36 +02:00
Tor Hedin Brønner 3f1b4a7b8f minimap: Limit highlight height 2019-10-17 22:25:56 +02:00
Ole Jørgen Brønner 0ce41886a0 settings: dev/debugging utils to delete workspace settings 2019-10-17 20:17:21 +02:00
Tor Hedin Brønner 710e1f9c92 layout: remove unnecessary code
This shouldn't be necessary as we update space.targetX before running
ensureViewport, so the target window will always be inside the view port.
2019-10-17 15:37:42 +02:00
Tor Hedin Brønner ce94061df8 addWindow: On first window just center targetX, leave rest to layout
Do not set cloneContainer.x directly, this can cause jumps.

But we do want to center space.targetX so layout knows that it should center the
tiling.
2019-10-17 15:37:42 +02:00
Ole Jørgen Brønner 4c36d5d203 cycle-window-width: let Space.layout take care of moving the window
Old logic kept for scratch windows.

Combined with 8ec37f1 keep a rightmost positioned window rightmost after
shrinking.
2019-10-17 15:25:19 +02:00
Tor Hedin Brønner 81136e1b44 center first window 2019-10-16 14:06:15 +02:00
Tor Hedin Brønner 8ec37f1987 tiling: try to maximize the space when removing/adding windows
fixes #104
2019-10-16 14:06:15 +02:00
Tor Hedin Brønner 8e79e36934 winprops: make gnome-screenshot floating by default 2019-10-16 11:51:57 +02:00
Tor Hedin Brønner 8d74e3c5f8 init: handle auto started applications
If there's a new workspace between `enable` and `startup-complete` we would miss
it, leaving us in a broken state.

In particular this happens when using dynamic workspaces and having a window
spawn on startup.
2019-10-15 19:27:48 +02:00
Tor Hedin Brønner 076cbb655e Fix new window handling in gnome shell version 3.28 to 3.32
The opacity hack does not work in 3.32 and less. In fact setting opacity on
`queue-redraw` can kill a windows visibility entirely for some reason. The
windowactor property are fine, but the actor still doesn't show up.

So lets just kludge this for compatibility :P

fixes #184
2019-10-14 16:55:29 +02:00
Tor Hedin Brønner 4b1c8264c0 kludges: disable pinch to overview gestures
These just doesn't work well and are easy to trigger while scrolling with the
touchpad. (it doesn't help that the overview can be slow as hell)

Thankfully this variable was exposed as a `var` so we override it :)

If you want these you can add this in your `user.js` enable function:
```
Kludges.disableOverride(imports.ui.viewSelector, 'PINCH_GESTURE_THRESHOLD');
```
2019-10-14 16:38:35 +02:00
Tor Hedin Brønner e560c44fa5 kludges: refactor override system
Not in full use yet.

But the main point is saving the original method on init, supplying an optional
override which will take effect on enable. We reset all properties to their
original form on disable.

NOTE: a property is only ever saved the first time, but new overrides can be
supplied as much as you want.
2019-10-14 16:00:54 +02:00
Tor Hedin Brønner 3b9e676d68 prefs workspaces: Add gnome-control-center background button 2019-10-12 13:02:53 +02:00
Tor Hedin Brønner b3eee42762 window created: kill actor visibility on queue-redraw
Finally found a reliable solution for x11.

`first-frame` happens _after_ mutter has drawn the first frame. Meaning there's
a chance of seeing one broken frame (happens reliably with eg. gnome-tweaks).

This worked before as we hid the actor, but we now set opacity instead to work
around 3.34 not allocating hidden actors. opacity is apparently reset on the
first draw, meaning we need to set opacity between `window-created` and
`first-frame`, `queue-redraw` is the obvious choice here.
2019-10-11 11:48:07 +02:00
Tor Hedin Brønner ad8e431b8c fixup: and animate existing window on insertion 2019-10-11 10:32:45 +02:00
Tor Hedin Brønner cf716ea1e8 fixup: do not hide existing windows on new insert 2019-10-11 10:28:01 +02:00
Tor Hedin Brønner fa3677e1fc Fix new window animation more
We try to make new windows be visible with opacity 0 as long as possible so
updates in the actor can be allocated correctly.
2019-10-11 09:14:17 +02:00
Ole Jørgen Brønner 60a5a95277 examples/keybindings: adjust width (<Super>plus/minus) 2019-10-10 22:14:43 +02:00
Tor Hedin Brønner 3b6d9309cc examples/keybindings: moveSpaceToMonitor fixup
No idea why this is necessary, but I sometimes get bugged focus and topbar
without it.
2019-10-10 21:33:38 +02:00
Tor Hedin Brønner fd605e425b examples/keybindings: add moveSpaceToMonitor binding 2019-10-10 19:58:21 +02:00
Tor Hedin Brønner e5031142d2 prefs: fixup monitor bindings 2019-10-10 18:40:28 +02:00
Tor Hedin Brønner 0f15c879f5 prefs: Use All workspaces and `Per workspace frame 2019-10-10 18:40:28 +02:00
Tor Hedin Brønner dd9b577e29 settings: Add use-default-background preference
Does not support timed backgrounds.

fixes #122
2019-10-10 18:40:28 +02:00
Tor Hedin Brønner 1ff9a6497b monitor keybindings: activate the defaults when paperwm is disabled 2019-10-10 17:05:46 +02:00
Tor Hedin Brønner 7d8d30b77a prefs: Add monitor keybindings 2019-10-10 15:15:39 +02:00
Tor Hedin Brønner 8e324f7a69 readme: document monitor keybindings 2019-10-10 15:15:39 +02:00
Tor Hedin Brønner 3af9d23d76 monitors: Add switch/move to monitor bindings 2019-10-10 15:15:39 +02:00
Tor Hedin Brønner 80c3792ad8 kludges: disable 4-finger workspace switching
We still aren't able capture the events, but we can override `_checkActivated`
to always return false, making the gesture always ineffectual.
2019-10-10 12:55:03 +02:00
Tor Hedin Brønner 762a6d93c2 workspace menu: do not activate the overivew if navigating 2019-10-10 11:32:50 +02:00
Tor Hedin Brønner 2df6953f97 vertical swipe: fix velocity bug
We didn't update the time, so all ticks were compared against the time when we
started swiping.
2019-10-10 11:25:59 +02:00
Tor Hedin Brønner 94ecfc9f10 horizontal swipe: update target window continuously
Run the basic timetravel on each update, highlighting the calculated target.
2019-10-10 11:25:59 +02:00
Tor Hedin Brønner ef1be46ff7 horizontal swipe: average velocity over the 3 latest ticks 2019-10-10 09:04:40 +02:00
Tor Hedin Brønner a6f3dadfc7 workspace menu: fix accessibility name 2019-10-10 07:55:11 +02:00
Tor Hedin Brønner e701df8a6a navigator: Don't finish navigation if super is held down 2019-10-10 07:54:20 +02:00
Tor Hedin Brønner f113077d88 minimap: add some minimum monitor padding 2019-10-10 07:53:22 +02:00
Tor Hedin Brønner 15c3f7e4fc layout: Set positions if immediately if not animating
No need for the ad-hoc fix in Space.init anymore.
2019-10-09 03:54:34 +02:00
Tor Hedin Brønner e8a017b517 horizontal swipe: detect partially visible fullscreen windows
space.isPlaceable cares about the metawindow being placeable, while we only care
about it being partially visible.
2019-10-09 03:34:49 +02:00
Tor Hedin Brønner d7c412f4b3 prefs: fixup 2019-10-09 00:11:53 +02:00
Tor Hedin Brønner 2de1f82dfb prefs: Hook up sensitivity and friction spinners 2019-10-08 09:08:20 +02:00
Tor Hedin Brønner 269ea7e21a prefs: Add some much needed margins and other fixes 2019-10-08 09:08:20 +02:00
Tor Hedin Brønner 21ed59447d settings: add swipe-friction 2019-10-08 09:00:45 +02:00
Tor Hedin Brønner 5b70afb30d horizontal swipe: Rework target window logic
Not the prettiest code, but it works fairly well.

Selecting the target window works like this (when gliding is finished):
- if the tiling is outside the monitor select the first/last window and snap
- if there's any fully visible windows select the closest one
- if there's no visible window choose the window with highest visible width ratio

This is all calculated the moment we release the swipe, so instead of showing
any potential overshoot we simply adjust the travel so it doesn't overshoot.
2019-10-08 07:08:57 +02:00
Tor Hedin Brønner f5ac57a752 horizontal swiping: Timetravel and use easing to glide 2019-10-07 10:31:02 +02:00
Tor Hedin Brønner 29cd9695b2 gestures: Fix unwanted snapping at the edges 2019-10-06 08:11:13 +02:00
Tor Hedin Brønner a908d2a208 x11: fix unreactive floats on empty workspaces
Make sure space.targetX is synced, if it isn't moveDone won't get the chance to
remove the background tracker, which steals all mouse clicks.
2019-10-05 12:16:29 +02:00
Tor Hedin Brønner 47f416553e fix typo 2019-10-03 02:03:18 +02:00
Tor Hedin Brønner 02012bc147 liveAltTab: kill unminimize animations manually
In 3.34 there's no _blockAnimations check, so we just set the correct
coordinates and scale immediately.
2019-10-02 21:26:03 +02:00
Tor Hedin Brønner d9c59ef50e prefs: don't scroll the tabs
The default tree view search doesn't work and can pop up outside the scroll so
disable it.

TODO: add something like `ctrl-f`, `/` to focus the search input
2019-10-01 22:20:19 +02:00
Tor Hedin Brønner fbd5dfbd5b startup: expose failures on startup
Pass the error notification utility to module.enable and use it in the startup
callback.
2019-10-01 17:11:27 +02:00