Commit Graph
1298 Commits
Author SHA1 Message Date
Tor Hedin Brønner cbd4585da7 Merge pull request #167 from Pajn/gnome-3-34
Fix crash under Gnome 3.34
2019-09-03 17:49:26 +02:00
Tor Hedin Brønner 7fb9f4a0c1 Fix full hot code reload
`getCurrentExtension()` does not work with gnome-shell-mode's eval. Use a
somewhat verbose feature detection to work around the changes made in 3.34.
2019-09-03 17:36:37 +02:00
Tor Hedin Brønner 97aff27a92 3.34: work around new object.actor rule
For ClutterActors object.actor === object, which means our `clone.actor` naming
needs to change.

https://gitlab.gnome.org/GNOME/gnome-shell/blob/master/js/ui/environment.js#L232
2019-09-02 00:52:48 +02:00
Rasmus Eneman f949799c37 Fix crash under Gnome 3.34 2019-08-30 08:16:23 +02:00
Ole Jørgen Brønner 95b6cd673d liveAltTab: only show TabList.NORMAL windows
Non-normal windows are unfocusable or request `mw.skip_taskbar`
2019-08-24 10:02:54 +02:00
Ole Jørgen Brønner 4adfad7298 Bugfix: new jetbrains IDE window could crash insertWindow
In general: NPE in stackoverlay when target window is non-`TabList.NORMAL`
crashes `insertWindow` midway. (eg. size-changed signal never connected).

A `TabList.NORMAL` window is focusable and doesn't `mw.skip_taskbar`.

Example: The main window of pycharm on startup is (sometimes) non-normal(!).
Focusing the window fail so it's likely to become the stackoverlay target.

(java applications is a WM's worst nightmare..)
2019-08-24 09:20:14 +02:00
Ole Jørgen Brønner 2a0da27f9f Bugfix: connectOneShot signals didn't disconnect on Signals.disconnect
Prevented 2364308681 from working in all
cases. (ie. windows could still be registered twice)
2019-08-14 22:27:12 +02:00
Ole Jørgen Brønner 611680e06b More robust determination of focus window when inserting new window
Seem the ordering of "focus", "window-created", "window-added" and "first-frame"
and the corresponding update of eg. global.display.focus_window and the mru list
is quite complicated and non-deterministic..

Some sampling reveals the following possible combinations on 3.28 X11:
fw = global.display.focus_window, mw = metaWindow in insertWindow (new window)

fw = mw  mw = mru0  !fw     fw = mru0  fw = mru1
false    false      false   false      false
false    false      false   true       false
false    true       false   false      true
false    true       true    false      false
true     false      false   false      true
true     true       false   true       false

So it's quite messy, but we can (hopefully) always rely on the currently
focused  ("adult") window to be in the mru.
2019-07-24 11:48:04 +02:00
Ole Jørgen Brønner a4e7950d38 Bugfix: window actor of some floating windows was never shown
If a floating window initially was marked as is_on_all_workspaces the actor was
never shown (after the initial animateWindow)

fixes #156
2019-07-19 20:26:43 +02:00
Tor Hedin Brønner e05373895c set-recommended-gnome-shell-settings: do not prefer static workspaces
We now support dynamic workspaces well, so there's no longer a good reason to
prefer static workspaces by default.
2019-07-16 15:46:45 +02:00
Tor Hedin Brønner 98f4161e95 x11: force an animate cycle after workspace switches
When switching between monitors, we can get into a situation where windows
aren't taking mouse input, looks like a weird x11 bug.
2019-07-16 15:40:59 +02:00
Spiss, Lukas eb36f7938a Add panel offset to label position 2019-07-14 20:30:43 +02:00
Ole Jørgen Brønner ba0c82f273 toggle-maximize-width: unmaximze if window is maximized
Note: the reason we doesn't simply use `maximize(Meta.MaximizeFlags.HORIZONTALLY`
for toggle-maximize-width is that maximized windows are unmovable [1] and (more
debatable) that maximized width should honor minimumMargin.

[1] doesn't play to well with paperwm, though we have some hacks in place for
    regular maximized windwos

Ref: #157
2019-07-14 13:14:13 +02:00
Rasmus Eneman e87080e795 Unmaximize window on cycleWidth 2019-07-14 12:44:58 +02:00
Spiss, Lukas 9a03f5952e Fix capitalization in settings 2019-07-13 23:33:06 +02:00
Spiss, Lukas cf6b4ac3dd Fix typo in settings 2019-07-13 23:33:06 +02:00
Ole Jørgen Brønner 2364308681 Ensure 'startup-complete' is not connected twice
Windows sometimes was registered (`registerWindow`) twice on startup (observed
on X11 3.28) causing all sorts of problems.

Seems like the extension sometimes is enabled/disabled twice on startup causing
the 'startup-complete' signal to be connected twice. Use the `Signals` class to
manage the signal to guard against this scenario.

I added a one-shot function to `Signals` since it's an error to disconnect an
already disconnected signal and that would happen on disable if the
'startup-complete' signal disconnected the signal itself.

assoc: d8069078f2
2019-07-09 18:47:06 +02:00
Ole Jørgen Brønner ea9f6c225a prefs: add note about triggering a layout to see the changes 2019-07-08 18:36:38 +02:00
Ole Jørgen Brønner 4e511e37ac Bottom margin
Kept the 'vertical-margin' key (as opposed to renaming to some variant of
top-margin) for compatibility reasons

closes #146
2019-07-08 18:36:38 +02:00
Kolloom 446f51982a readme: document paperwm conflict with desktop-icon shell extension
olejorgenb: Moved the note to the install section and did some minor rewording

closes #148
2019-07-08 00:06:38 +02:00
David Tolnay f01a5bacd0 Fix typo in enable/disable log messages 2019-07-07 12:34:51 +02:00
Ole Jørgen Brønner d8069078f2 Guard against duplicate registerWindow
Seems to happen once and a while (observed on X11 3.28)
2019-07-06 18:29:17 +02:00
Ole Jørgen Brønner f81177ff16 readme: Document using dconf-editor to change settings 2019-07-06 13:56:09 +02:00
Tor Hedin Brønner cae7458d94 navigator: do not cancel on tab
closes #149
2019-07-06 13:20:31 +02:00
Ole Jørgen Brønner 82bc64512a prefs: clear workspace background button 2019-07-06 12:23:29 +02:00
Ole Jørgen Brønner ae8e91093b Show a warning notification when failing to bind a key (user.js) 2019-07-02 21:49:20 +02:00
Tor Hedin Brønner a5f0eefa4b keybind examples: support specifying keyboard combo 2019-07-01 22:17:09 +02:00
Ole Jørgen Brønner 850e69d7f3 Prevent cycle-width/height from resizing beyond the monitor
Partly motivated to prevent resizing to enormous sizes if the steps contains
mixed ratios and pixel counts: [0.3, 300] would interpret 300 as a ratio :)
2019-07-01 22:11:01 +02:00
Ole Jørgen Brønner 040be580ac Configurable cycle-width/height steps 2019-07-01 22:11:01 +02:00
Tor Hedin Brønner 8e667c0c11 Require a threshold motion to trigger workspace switch
On multi monitor setups we usually want the monitor focus to follow the mouse
pointer since non-active workspaces don't react to the pointer at all.

Unfortunately it's not possible to warp the pointer from gnome-shell extensions
in wayland yet. The pointer will be left on an inactive monitor when switching
workspaces using the keyboard. This makes it extremely easy to trigger an motion
event and inadvertently switching monitor focus (in fact this simply happens the
moment we activate the motion listener).

So add a motion threshold to filter out pointer motions without user intent.
2019-07-01 22:07:57 +02:00
Ole Jørgen Brønner fcbede7559 Sync space settings on workspace changes
If the indices isn't synced a disable/enable cycle will jumple the workspace
names/backgrounds
2019-07-01 22:03:49 +02:00
Ole Jørgen Brønner 15c4b58ca4 Bugfix: display.grab_accelerator in gnome-shell 3.3x expects two arguments
fixes #138
2019-07-01 09:59:53 +02:00
Ole Jørgen Brønner 9a6cf9dba3 examples: don't use global.screen
screen is removed in gnome 3.3x
2019-06-29 12:20:53 +02:00
Ole Jørgen Brønner f5bf26cbde examples: usage instructions 2019-06-29 12:18:26 +02:00
Ole Jørgen Brønner ce68de1125 examples: cycle focused monitor action 2019-06-29 12:17:40 +02:00
Tor Hedin Brønner 86beb27e04 Use a shadowed border to frame spaces in the carousel
A colored border is added to frame the space when using the workspace carousel.

This helps to separate the workspaces visually. Especially when using a
shared image background for workspaces and the gnome shell background.

We also make the background the same size as the monitor making the overview
transition smooth when using a single background.

During regular use the border is hidden, to avoid shadows at the edges of the
monitor.

closes #86
2019-06-27 23:48:08 +02:00
Tor Hedin Brønner 531df13fa2 Hide top bar when fullscreening on secondary monitor
closes #134
2019-06-26 18:22:07 +02:00
Tor Hedin Brønner 46c67fdb1f wayland: Don't hide top bar on startup 2019-06-26 18:21:25 +02:00
Tor Hedin Brønner 5a8b1c29b0 monitors-changed: guard against newly created monitors during disable
If a monitor is added in between a disable/enable cycle we can run into troubles
again if there's too few workspaces.
2019-06-25 03:44:07 +02:00
Ole Jørgen Brønner 4322009d9f cleanup: remove dead code
The 'workspace-names' values might still come out of sync when a in-the-middle
workspace is removed - but:

- This is not very visible since each space have a "copy" of it's real name
- The code have been dead for a long time
- Better to handle everything in `workspacesChanged`

The best solution is probably to reindex the existing spaces' settings on
workspace removal and then set 'workspace-names' based on the live-spaces.
2019-06-23 22:45:38 +02:00
Tor Hedin Brønner 5dd84b985c Fix disable/enable
When running a disable/enable loop (eg. through screen locking) space.init() was
run before windows were registered (ie. gotten their clones etc.).

We also need to set up the monitors unconditionally before space.init() is run.

This is a bit ugly but should work until we can clean it up better.

closes #128
2019-06-23 19:24:11 +02:00
Tor Hedin Brønner 753ae5ccfb monitors-changed: make sure each monitor has a space
If we've run out of workspaces when there's more monitors to populate simply add
new ones.

NB: this only works after startup-complete as we need to listen to
`notify::n-workspaces` first.

closes #116
2019-06-23 18:36:17 +02:00
Tor Hedin Brønner 500ce60973 bug fix: initialize all new spaces
Workspaces created after startup was never actually initialized, eg.
the `window-added/removed` signals were never connected.

Simply run space.init when constructing a space and handle the _startingUp edge
case.
2019-06-23 18:36:17 +02:00
Ole Jørgen Brønner 570abadc9b dynamic workspaces: never remove a visible workspace
This caused a crash when going from a empty visible workspace that was going to
be garbage collected to another monitor.
2019-06-23 18:36:15 +02:00
Tor Hedin Brønner b5aa3cf09a dynamic workspaces: only remove spaces when #workspaces > #monitors
We need at least as many workspaces as there's monitors.
2019-06-23 18:34:45 +02:00
Tor Hedin Brønner 786950d576 bug fix: topbar::hide focus_window can be null 2019-06-23 18:09:00 +02:00
Julia Evans 7eb0bc1322 Fix typo in keybindings example
I tried using this and got an error because `i` should be `k`, with this change it works for me.
2019-06-23 01:09:56 +02:00
Nathan Morell 7d1b3757cd Typo fixed in README.md 2019-06-22 09:15:00 +02:00
Tor Hedin Brønner 02131fb22c Add swipe sensitivity preference
Tune using (defaults are [1.0, 2.0]):
dconf write /org/gnome/shell/extensions/paperwm/swipe-sensitivity "[x, y]"
2019-06-17 11:42:31 +02:00
Ole Jørgen Brønner 4c89ef385a set-recommended-gnome-shell-settings: use 'gsettings' instead of 'dconf'
dconf can't reliable get default values(?)

According to https://bugzilla.redhat.com/show_bug.cgi?id=1541448 the dconf
default value might also differ from the gsettings default value(?)

I did not find a way to differentiate between "use default value" and the actual
default value - so running the script might change some settings from "use
default value" to the actual default value.

IIUC 'gsettings' require the gsettings daemon to run, while 'dconf' is lower
level and modify the database directly.

Fixes #121
2019-06-16 15:37:57 +02:00