Skip to content

Commit

Permalink
Merge pull request #158 from Fmstrat/develop
Browse files Browse the repository at this point in the history
major bugfix
  • Loading branch information
GrylledCheez authored Jul 25, 2023
2 parents ffce1b6 + 9c6e8e4 commit be644ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
11 changes: 10 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
11 changes: 1 addition & 10 deletions keybindings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"url": "https://github.com/fmstrat/wintile",
"settings-schema":"org.gnome.shell.extensions.wintile",
Expand All @@ -13,5 +13,5 @@
"43",
"44"
],
"version": 13
"version": 14
}

0 comments on commit be644ad

Please sign in to comment.