Commit Graph
575 Commits
Author SHA1 Message Date
Tor Hedin Brønner 6a860a7a4a selectSpace: Don't restart animations 2018-08-01 22:59:22 +02:00
Tor Hedin Brønner eac88ac2fd workspace scroll: Add smooth scroll for touchpads 2018-08-01 22:58:43 +02:00
Tor Hedin Brønner 7173f2fa15 Refactor _initWorkspaceStack out of selectSpace 2018-08-01 22:58:37 +02:00
Tor Hedin Brønner bad680975c layout: Center correctly
Subtract the last added gap
2018-07-24 18:20:38 +02:00
Tor Hedin Brønner 1b03c6177d Fix "Guard against moving windows while changing monitors"
`monitor.index` is a number, not a function. So the guard doesn't seem to work
as it just happened to prevent moving windows to other monitors/workspaces.
2018-07-23 18:15:38 +02:00
Tor Hedin Brønner c349e068d1 Another fix for clipping in the overview 2018-07-21 15:11:38 +02:00
Tor Hedin Brønner 051d778d78 Show the window actors when leaving the overview 2018-07-20 10:48:35 +02:00
Tor Hedin Brønner 9e97ba77c8 Avoid showing any clipping when the overview is active 2018-07-19 12:59:54 +02:00
Tor Hedin Brønner 5e89005a5d Set a max width for tiled windows 2018-07-19 10:31:17 +02:00
Tor Hedin Brønner cea275d222 Guard against moving windows while changing monitors 2018-07-19 10:31:17 +02:00
Tor Hedin Brønner 371b9f2c0e spaces: rebuild the stack on monitors-changed 2018-07-19 10:31:17 +02:00
Tor Hedin Brønner a2b5a26838 Expose the workspace preview in Tiling.inPreview
Might not be ideal, but having it on spaces can cause trouble if ensureVievport
is called before spaces is constructed fully.
2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 07ab295d28 Add move functionality to spaces.selectSpace 2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 222421d694 Insert new windows into the correct space when navigating 2018-07-18 23:08:23 +02:00
Tor Hedin Brønner 1529fd86f4 switch-first/last: Integrate properly into the navigator 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 73b028e423 Apply actions to the correct space 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner 0ed2cd32bf Refactor workspace selection from navigator to spaces
This is a bit cleaner, and makes it possible to deal with previous-workspace
etc. the same way as switch-next etc. ie. mostly handled through it's action
handler, instead of special casing in navigator.js.

Another benefit is that we now actually keep track of the workspace mru
directly, eg. empty workspaces doesn't just drop off for no reason.
2018-07-18 22:37:34 +02:00
Tor Hedin Brønner b7eda1957d Move switch-workspace handling to Spaces 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner 39e0a68d3c Refactor switch-next/previous 2018-07-18 22:37:34 +02:00
Ole Jørgen Brønner 61290f142d Prepare for navigator refactor + refactor switch-left/right/up/down 2018-07-18 22:37:34 +02:00
Tor Hedin Brønner fc260da22d Consistently declare and use screen and display
Makes things shorter and removes language warnings of using undeclared
variables.
2018-07-12 16:14:26 +02:00
Tor Hedin Brønner d41d6b9033 Fix duplicate workspace settings
Simplyfy things by storing all workspace settings from the get go.
2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 55c6b60803 Add settings UI with workspace controls and gap and margin spinners
`Settings.ui` is built with and can be inpsected with Glade.
2018-07-11 18:47:56 +02:00
Tor Hedin Brønner 0a8a0079c9 Fix resize grab, layout should actually respect animate 2018-07-10 15:21:23 +02:00
Tor Hedin Brønner 811473462a Use the stacking order when updating the stack around focus
This will focus the last _selected_ neighbour when closing focus, instead of the
last focused neighbour. This pick should be more obvious, eg. when selecting the
left window, closing focus, and then suddenly going to the right window (since
it happened to be the last focus).
2018-07-10 14:53:01 +02:00
Tor Hedin Brønner 49082dbd56 Add basic wallpaper support
Also add noise by default

To set a background:
```
space.settings.set_string('background', '/path/to/image.png')
```

To reset:
```
space.settings.set_string('background', '')
```
2018-07-08 12:09:47 +02:00
Tor Hedin Brønner c723fa2a4d Use new workspace settings schema
Per workspace settings can be accessed through `space.settings`.

A setting's path is stored under its uuid in
`/org/gnome/shell/extensions/paperwm/workspaces/${uuid}/`. When modifying a
workspace setting the uuid will be recorded in
`org.gnome.Shell.Extensions.PaperWM.WorkspaceList`.

Spaces get their settings by looking for an uuid with an `index` key
corrosponding to its `workspace.index()`. If such a setting can't be found the
space will be given a fresh uuid and the name and color will be assigned as
before.
2018-07-08 12:09:47 +02:00
Tor Hedin Brønner 9ed46519c3 Animate selection scale when inserting a new window 2018-07-07 21:20:58 +02:00
Tor Hedin Brønner be47d68248 Get rid of space.delayed
Guard against syncing and showing window actors if we're not at `space.targetX`,
ie. if we're still animating.

Also correctly set `space.moving` only when we're actually animating.
2018-07-07 19:16:48 +02:00
Tor Hedin Brønner aeebf8daa5 Connect size-changed signal when adding new windows to the scratch
Missed a return on `addToScratch`.
2018-07-07 10:29:32 +02:00
Tor Hedin Brønner 9c9a79743a grab: actually fix all of the coordinates... 2018-07-06 21:41:56 +02:00
Tor Hedin Brønner c127a76454 grab: Fix coordinates 2018-07-06 21:39:06 +02:00
Tor Hedin Brønner 5a8a071b99 Only reset selection when the tiling is empty
Due to `focus` running before `window-removed` we would end up resetting the
selection width after it had been correctly set up.
2018-07-05 22:15:03 +02:00
Tor Hedin Brønner 4e8dcc5ad3 Refactor space.fixVisible out of move_to
We need to update the visible windows after layout too.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 266eb52c3b Rerun layout on a column if a frame's width changes unexpectetly
A typical case is mpv which preseerves its aspect ratio, resulting in a
completely different width than requested. This would cause `resize` to call
layout recursively running the first layout call last.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner d264382dac Connect to size-changed after initial placement and resize
This prevents the move_to call in `resizeHandler` leading to the wrong initial
position in wayland.
2018-07-05 22:11:07 +02:00
Tor Hedin Brønner 8ae1814acb Only call moveDone once from layout 2018-07-04 20:47:04 +02:00
Tor Hedin Brønner a605dc4668 Clip tiled window actors to the monitor
fixes #61
2018-07-04 20:47:04 +02:00
Tor Hedin Brønner 6b44a9139f cleanup: Remove a bunch of unconditional logging 2018-07-03 00:08:40 +02:00
Tor Hedin Brønner 3548f219a2 Rename prefs.js to settings.js
prefs.js causes issues as its used to lauch the settings gui from eg. tweaks.
2018-07-02 22:31:55 +02:00
Ole Jørgen Brønner eb975ec811 centerWindow: only warp pointer if it's inside the selected window 2018-07-02 20:14:42 +02:00
Ole Jørgen Brønner 4f75b45ea8 Bugfix monitor relative coordinates 2018-07-02 19:44:58 +02:00
Tor Hedin Brønner d80abfbe11 Fix broken pointer warping on centerWindowHorizontally 2018-07-02 19:09:43 +02:00
Tor Hedin Brønner 6ff1af0c58 Document the new space structure 2018-07-02 18:56:23 +02:00
Tor Hedin Brønner 4ce41ab54b Fix highlight width while grab resizing 2018-07-02 18:29:24 +02:00
Tor Hedin Brønner 1f62242b56 Add and use Space.startAnimate 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner d03dc78cd6 Always select a neighbour when closing selectedWindow
Only look at the neighbours of the closed window when selecting a new window.

Also raise the window on ensure, this way the stacking order works like an mru
for selectedWindow.
2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 36b28ace99 Restore window position correctly when exiting fullscreen 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner 714938fcde Don't add the clone twice 2018-07-02 18:28:25 +02:00
Tor Hedin Brønner ea77c4609f Disconnect destroyed windows and actors 2018-07-02 18:28:25 +02:00