Tor Hedin Brønner
84b281935e
Clip WindowActor to the whole monitor
2019-11-25 20:02:39 +01:00
Tor Hedin Brønner
b58050f7f5
Revert "insertWindow: derive existing from metaWindow.unmapped"
...
This reverts commit 1c5779116b .
Not entirely sure what's up here, but this triggers infinite recursion when
eg. opening the color picker from paperwm prefs.
fixes #200
2019-11-20 11:58:13 +01:00
Tor Hedin Brønner
30eb45c2cc
Space.layout: emit layout
2019-11-19 02:32:09 +01:00
Tor Hedin Brønner
788c328155
sequential space navigation: Include empty workspaces
...
Empty workspaces are trivial to move between monitors, so include them when
navigating workspaces sequentially.
2019-11-12 23:25:15 +01:00
Tor Hedin Brønner
1bb973b36e
switchWorkspace: Don't set up animation if moving between monitors
2019-11-12 14:19:30 +01:00
Tor Hedin Brønner
74f7049107
animateToSpace: Animate the whole sequence of spaces
...
When finishing sequential navigation the selected space will be correctly
animated into place. The other spaces will stand still however, which is
especially noticable if a neighboring space is above the newly selected space.
Make use of _animateToSpaceOrdered to finish sequential navigation to fix this.
2019-11-12 14:19:30 +01:00
Tor Hedin Brønner
370d864d61
Spaces: Refactor out _animateToSpaceOrdered(toSpace, animate = true)
2019-11-12 14:19:30 +01:00
Tor Hedin Brønner
c5dc1e3c66
Spaces: Add _getOrderedSpaces(monitor) -> [Space]
2019-11-12 14:19:30 +01:00
goodwillcoding
98657bcb63
Spaces: Disallow switching between stack and sequential navigation
2019-11-12 14:19:30 +01:00
goodwillcoding
77e7ae15a9
rename selectSpace to selectStackSpace
...
(and switchSpace to selectSequenceSpace)
2019-11-12 14:19:30 +01:00
goodwillcoding
5d148a3f6a
Spaces: add sequential navigation of spaces
2019-11-12 14:19:30 +01:00
Tor Hedin Brønner
1c5779116b
insertWindow: derive existing from metaWindow.unmapped
...
When using `workspaces-only-on-primary` it's possible to trigger insertWindow
from `window-added` instead of `window-created`, leaving insertWindow thinking
the window is `existing`.
Simply use `metaWindow.unmapped` to figure out if a window is newly created or
not.
2019-11-11 16:24:18 +01:00
Tor Hedin Brønner
0bd9de889e
cycleWindowWidth: fix typo
2019-10-26 15:57:03 +02:00
Tor Hedin Brønner
d9d11fab97
space.workArea(): Wrap workarea logic
...
I left a few sites which operates in global coordinates, or otherwise actually
want the actual workArea.
2019-10-26 15:34:58 +02:00
Tor Hedin Brønner
c3e5d5f8dd
window highlight: Support maximized windows better
2019-10-26 15:33:26 +02:00
Tor Hedin Brønner
4cfe445477
tiling: Move cycle to Tiling.cycleWorkspaceSettings
2019-10-21 12:47:39 +02:00
Tor Hedin Brønner
82ddc02716
Space.moveDone: Only block on grabbing a tiled window
...
When dragging a window to a shared secondary monitor, moveDone is blocked by
`inGrab`. However we only want this as long as the window haven't been detached
by window-entered-monitor.
2019-10-20 14:27:11 +02:00
Tor Hedin Brønner
196368d3ec
tiling: Remove stray logging
2019-10-20 14:21:21 +02:00
Ole Jørgen Brønner
18b5507853
resize-actions: Increase "slack" and make it simpler to adjust
...
See https://gist.github.com/olejorgenb/434dcc616343a50d9d63f2a700ad89b7 for a
helper script to test various window constraints.
ref: #187
2019-10-20 11:48:47 +02:00
Tor Hedin Brønner
c7cbd847cc
window-entered-monitor: Only act on grabbed windows
2019-10-19 20:53:11 +02:00
Tor Hedin Brønner
ba43c68ba8
edge overlays: start out unactivated
...
Be sane and start in a clean state.
2019-10-19 19:13:19 +02:00
Tor Hedin Brønner
e290062253
insertWindow: Do not hide windows that are on all workspaces
2019-10-19 19:13:05 +02:00
Tor Hedin Brønner
c8b8d78636
insertWindow: Handle stuck windows minimally
...
When spawning windows on a secondary monitor, and there's
workspaces-only-on-primary, we simply want to connect the necessary signals and
make sure the window is shown.
2019-10-18 16:11:21 +02:00
Tor Hedin Brønner
d4838298d7
insertWindow: Make unstuck scratch windows stuck
...
When using `workspaces-only-primary` and a scratch window is moved from a
secondary monitor to the primary gnome-shell will make the window unstuck. So we
need to make it stuck again.
2019-10-18 16:11:21 +02:00
Tor Hedin Brønner
642640c66e
switchMonitor: Handle workspaces-only-on-primary
2019-10-18 16:11:21 +02:00
Tor Hedin Brønner
540c07dda3
grab window: Handle workspaces only on primary correctly
2019-10-18 16:11:21 +02:00
Tor Hedin Brønner
9c962f02ba
window-entered-monitor: Only handle grabs
...
We now have custom ways to move windows between monitors
2019-10-18 16:11:21 +02:00
Tor Hedin Brønner
0653664dd3
clickOverlay: never activate when workspaces-only-on-primary
...
This means we can simply create clickOverlays for all the monitors, avoiding any
annyoing errors with missing overlays.
2019-10-18 16:10:41 +02:00
Tor Hedin Brønner
8916dde666
spaces: add onlyOnPrimary property
2019-10-18 14:06:01 +02:00
Tor Hedin Brønner
10038d417a
layout: Run ensureViewport on auto corrections too
...
`auto` doesn't ensure that the selected window is inside the viewport.
2019-10-17 23:44:03 +02:00
Tor Hedin Brønner
0239b4e7a5
Fix errors on X11 startup when auto spawning windows
2019-10-17 23:08:30 +02:00
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
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
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
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
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
3af9d23d76
monitors: Add switch/move to monitor bindings
2019-10-10 15:15:39 +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
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
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
Tor Hedin Brønner
7988020aff
workspaces-only-on-primary: ensure layout happens after overlay setup
2019-10-01 16:52:48 +02:00
Tor Hedin Brønner
8daee7ce38
Remove transition from tween calls
2019-09-28 16:20:42 +02:00