From 20ede9cbe19e7b3bc98a99a318e521ee695e5754 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 24 Aug 2020 22:35:26 +0100 Subject: [PATCH 1/5] Include configuration docs in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 393d9be..5790112 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,7 @@ WinTile can be found on the GNOME Extension site: https://extensions.gnome.org/extension/1723/wintile-windows-10-window-tiling-for-gnome/ + +# Configuration +1. Visit https://extensions.gnome.org/local/ +1. click on the "Configure this extension" button. From 62399c83d64c15f7c07380670885eb37ab02d4e6 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 25 Aug 2020 11:55:00 +0100 Subject: [PATCH 2/5] Update README.md Co-authored-by: Balazs Gyurak --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5790112..81f68da 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,5 @@ https://extensions.gnome.org/extension/1723/wintile-windows-10-window-tiling-for # Configuration 1. Visit https://extensions.gnome.org/local/ -1. click on the "Configure this extension" button. +1. Click on the "Configure this extension" button. +1. Alternatively, open the `Extension` settings in [Gnome Tweaks](https://gitlab.gnome.org/GNOME/gnome-tweaks), locate `Wintile` and click on the cogwheel button to bring up the configuration dialog. From 356a31ef00325f20efd06ccba7f345d695936795 Mon Sep 17 00:00:00 2001 From: moemode Date: Wed, 4 Nov 2020 20:32:31 +0100 Subject: [PATCH 3/5] Fix 'dislpays' repo --- prefs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index 054d68b..4a386fd 100644 --- a/prefs.js +++ b/prefs.js @@ -152,7 +152,7 @@ function buildPrefsWidget() { // Delay let previewDelayLabel = new Gtk.Label({ - label: _(" Delay in ms before preview dislpays"), + label: _(" Delay in ms before preview displays"), visible: true, hexpand: true, halign: Gtk.Align.START From 7dac8cb5f79e4c5fcd58378698d85c050164b758 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Wed, 27 Jan 2021 16:14:43 +0100 Subject: [PATCH 4/5] Fix for movement bug for gnome-terminal and [gnome-]terminator. It turns out that in recent Gnome-shell versions, terminals do not always move to the right location with just a move_resize_frame, which can be reliably (but not beautifully) fixed by additionally using move_frame. Corresponding fix commit in the gTile extension by jshack88: https://github.com/gTile/gTile/commit/fc68797015e13143f74606fcbb9d48859f55dca9 --- extension.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/extension.js b/extension.js index e37108b..8e4e7ca 100644 --- a/extension.js +++ b/extension.js @@ -79,6 +79,18 @@ var oldbindings = { toggle_tiled_right: [] } +// Move window to specified location and size. +// On paper, the move_resize_frame should not need the preceding move_frame, +// but the additional move_frame is known to fix errors with gnome-terminal +// and [gnome-]terminator. +// A similar fix is used in the gTile extension: +// See https://github.com/gTile/gTile/commit/fc68797015e13143f74606fcbb9d48859f55dca9 by jshack88. +function moveAppCoordinates(app, x, y, w, h) { + _log("Moving window to ("+x+","+y+"), size ("+w+","+h+")" ); + app.move_frame(true, x, y, w, h); + app.move_resize_frame(true, x, y, w, h); +} + function moveApp(app, loc) { _log("moveApp: " + JSON.stringify(loc)); var space = null; @@ -99,12 +111,12 @@ function moveApp(app, loc) { if (!config.useMaximize) { unMaximizeIfMaximized(app); - app.move_resize_frame(true, x, y, w, h); + moveAppCoordinates(app, x, y, w, h); } else { if (loc.height < 2 || loc.width < config.cols) { unMaximizeIfMaximized(app); } - app.move_resize_frame(true, x, y, w, h); + moveAppCoordinates(app, x, y, w, h); if (loc.height == 2 && loc.width == config.cols) { // Maximize _log('maximize') @@ -184,7 +196,7 @@ function restoreApp(app, move=true) { if (app.wintile.origFrame.y+app.wintile.origFrame.height > space.y+space.height) { app.wintile.origFrame.y = space.y + space.height - app.wintile.origFrame.height - 100; } - app.move_resize_frame(true, app.wintile.origFrame.x, app.wintile.origFrame.y, app.wintile.origFrame.width, app.wintile.origFrame.height); + moveAppCoordinates(app, app.wintile.origFrame.x, app.wintile.origFrame.y, app.wintile.origFrame.width, app.wintile.origFrame.height); } else { // BUG: when clicking the maximize button, then dragging the window off, it moves to below the mouse cursor let [x, y, mask] = global.get_pointer(); @@ -195,7 +207,7 @@ function restoreApp(app, move=true) { window = app.wintile.origFrame; _log(`A) origFrame - x:${window.x} y:${window.y} w:${window.width} h:${window.height}`); } - app.move_resize_frame(true, Math.floor(x-app.wintile.origFrame.width/2), y-10, app.wintile.origFrame.width, app.wintile.origFrame.height); + moveAppCoordinates(app, Math.floor(x-app.wintile.origFrame.width/2), y-10, app.wintile.origFrame.width, app.wintile.origFrame.height); if (config.debug) { let window = app.get_frame_rect() _log(`B) mouse - x:${x} y:${y}`); From c97a04e619880ac64ef4cdeb8709a5adc39ba10d Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Fri, 29 Jan 2021 08:15:58 +0100 Subject: [PATCH 5/5] Fixed bug for number of arguments to call: move_frame only takes three arguments. --- extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.js b/extension.js index 8e4e7ca..9e4f43b 100644 --- a/extension.js +++ b/extension.js @@ -87,7 +87,7 @@ var oldbindings = { // See https://github.com/gTile/gTile/commit/fc68797015e13143f74606fcbb9d48859f55dca9 by jshack88. function moveAppCoordinates(app, x, y, w, h) { _log("Moving window to ("+x+","+y+"), size ("+w+","+h+")" ); - app.move_frame(true, x, y, w, h); + app.move_frame(true, x, y); app.move_resize_frame(true, x, y, w, h); }