diff --git a/extension.js b/extension.js index 0e5f238..0ccb83c 100644 --- a/extension.js +++ b/extension.js @@ -390,7 +390,16 @@ function sendMove(direction, ctrlPressed = false) { } else { // We are already in a tile. _log('sendMove) Already in a tile.'); - _log(JSON.stringify(app.wintile)); + _log(`sendMove) ${JSON.stringify(app.wintile)}`); + if (app.wintile.width > colCount) { + _log(`sendMove) columns higher than expected. Lowering to ${colCount}`); + app.wintile.width = colCount; + } + if (app.wintile.height > rowCount) { + _log(`sendMove) rows higher than expected. Lowering to ${rowCount}`); + app.wintile.height = rowCount; + } + if (ctrlPressed) { // any amount of columns switch (direction) { diff --git a/keybindings.js b/keybindings.js index 9d3c1e1..686a008 100644 --- a/keybindings.js +++ b/keybindings.js @@ -1,13 +1,10 @@ 'use strict'; /* global global */ -const Config = imports.misc.config; const Main = imports.ui.main; const Meta = imports.gi.Meta; const Shell = imports.gi.Shell; -const SHELL_VERSION = parseFloat(Config.PACKAGE_VERSION); - /** * Keybindings.Manager is a simple convenience class for managing keyboard * shortcuts in GNOME Shell. You bind a shortcut using add(), which on success @@ -53,13 +50,7 @@ var Manager = class Manager { */ add(accelerator, callback) { let action = Meta.KeyBindingAction.NONE; - - // A flags argument was added somewhere between 3.30-3.32 - if (SHELL_VERSION < 3.30) - action = global.display.grab_accelerator(accelerator); - else - action = global.display.grab_accelerator(accelerator, 0); - + action = global.display.grab_accelerator(accelerator, 0); if (action !== Meta.KeyBindingAction.NONE) { let name = Meta.external_binding_name_for_action(action); diff --git a/metadata.json b/metadata.json index 5926372..08dd629 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "WinTile", - "description": "WinTile is a hotkey driven window tiling system for GNOME that imitates the standard Win-Arrow keys of Windows 10, allowing you to maximize, maximize to sides, or 1/4 sized to corner across a single or multiple monitors using just Super+Arrow.\n\nAs of v13, WinTile also supports:\n- 2-5 columns and 1-4 rows for standard or ultrawide monitors\n- Top/bottom half support\n- Mouse preview and snapping for placing windows\n- 'Maximize' mode, which adds/removes GNOME animations\n- 'Ultrawide-only' mode, to allow standard screens to have different cols/row than ultrawides\n- Add gaps around tiles to avoid the 'crowded elevator' feeling'", + "description": "WinTile is a hotkey driven window tiling system for GNOME that imitates the standard Win-Arrow keys of Windows 10, allowing you to maximize, maximize to sides, or 1/4 sized to corner across a single or multiple monitors using just Super+Arrow.\n\nAs of v14, WinTile also supports:\n- 2-5 columns and 1-4 rows for standard or ultrawide monitors\n- Top/bottom half support\n- Mouse preview and snapping for placing windows\n- 'Maximize' mode, which adds/removes GNOME animations\n- 'Ultrawide-only' mode, to allow standard screens to have different cols/row than ultrawides\n- Add gaps around tiles to avoid the 'crowded elevator' feeling'\n- Ctrl+Super+Arrow to grow a tile in that direction if space is available\n- Ctrl+drag to drop a tile in a specific spot\n- Ctrl+Super+drag to draw a grid for the new tile", "uuid": "wintile@nowsci.com", "url": "https://github.com/fmstrat/wintile", "settings-schema":"org.gnome.shell.extensions.wintile", @@ -13,5 +13,5 @@ "43", "44" ], - "version": 13 + "version": 14 }