Skip to content

Commit

Permalink
Merge branch 'main' into feature/tiling-menu-set-move-pointer-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
juarezr authored Dec 2, 2023
2 parents 32e45ce + 4128dcc commit b307d8b
Show file tree
Hide file tree
Showing 12 changed files with 211 additions and 236 deletions.
170 changes: 33 additions & 137 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,151 +4,47 @@ about: Create a report to help us improve the extension
title: 'bug: short descript of the issue'
labels: bug
assignees: ''

---

## Description

**What is the bug?**

### Problem Explanation

Write a clear and concise description of what the bug is:

The bug happens when ...

### Expected Behavior

A clear and concise description of what you expected to happen, and how the actual outcome differs:

- Forge extension shouldn't ...
- It should behave ...

## Reprodution

**How one can find the bug?**

### Steps To Reproduce

Steps to reproduce, if applicable:

1. Open application ...
2. Put the focus on ...
3. Press the gnome shortcut `<super>` `<shift>` `j` and ...
4. See the bug happening in the ...

### Details

Mark with [ ] all that applies:

#### It happens with any application?

- [ ] Yes, it applies to any application.
- [ ] No. Only with the following applications:
- VSCode, Terminal, ...
- [ ] It works with the following applications that I have tried:
- Fill in a list with any application that applies

#### It happens only on one computer?

- [ ] I don't know.
- [ ] No. I have tried it on more than one computer.

#### It happens only with some specific gnome configuration?

- [ ] I don't think that the configuration matters.
- [ ] Yes. Only if the following config is set up:
- Fill in a list with any configuration tha applies.

#### It happens only with some specific extension installed?

- [ ] I don't think that the installed extensions affect the bug/behavior.
- [ ] Yes. Only if the following gnome extension is installed:
- Fill in a list with any extension tha applies.
- Fill in also any detail about the extensions that applies.

## Diagnostics

**Under what conditions does it happen?**

Fill in all information that applies:

### Environment

- Distro version : ... (`uname -a`)
- GNOME Shell version: ... (`gnome-shell --version`)
- Forge source : ... (e.g: git branch or extensions.gnome.org)
- Forge version : ... (`gnome-extensions show [email protected]`)

### Display Setup

Displays:

1. 2 x 1080p
2. Dual monitor vertical orientation
3. Notebook 1920x1080 60hz + 4k monitor

### Screenshots

If applicable, add screenshots to help explain your problem:

#### Screenshot 1 description

...

#### Screenshot 2 description

...

### Output and Logs

Also if possible, please provide latest logs like:

#### Gnome Logs

**Command:** `journalctl --since='1 hour ago' --follow /usr/bin/gnome-shell`

#### System from 1 hour ago

**Command:** `journalctl -b 0 -r --since '1 hour ago'`:

``` bash
$ journalctl --since=now --follow /usr/bin/gnome-shell
...
```

#### Extension Configuration

**Command:** `dconf dump /org/gnome/shell/extensions/forge/`

``` bash
$ dconf dump /org/gnome/shell/extensions/forge/
...
```
<!-- Please be as descriptive as you can, please do not post any personally identifiable or confidential info on screenshots / video captures -->

#### Enabled Extensions
**(1) Issue/Bug Description/Video Capture/Screenshots:**

**Command:** `gnome-extensions list --enabled --details`
**(2) Steps to reproduce (if you know):**

``` bash
$ gnome-extensions list --enabled --details
...
```
**(3) Distribution and Linux version:**
<!--
cat /etc/os-release
uname -a
-->

#### Graphics information
**(4) Journal Logs from the last hour:**
<!--
journalctl --since='1 hour ago' --follow /usr/bin/gnome-shell
-->

**Command:** `lshw -C display`
**(5) Gnome Shell version:**
<!--
gnome-shell --version
-->

``` bash
$ lshw -C display
...
```
**(6) Forge version and where was Forge installed from:**
<!--
Put the extensions.gnome.org version or the commit sha if compiled from source.
-->

#### Monitor information
**(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):**
<!--
Specifying the monitor/display setup helps a lot for tiling troubleshooting
-->

**Command:** `xrandr --properties | grep -vE '(x|\s|\.|\d)+$'`
**(9) Other Installed/Enabled Extensions:**
<!--
# Other extensions:
gnome-extensions list --enabled --details
-->

``` bash
$ xrandr --properties | grep -vE '(x|\s|\.|\d)+$'
...
```
**(10) Other Notes:**
<!--
Anything not covered or N/A
-->
15 changes: 6 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**(1) Describe your proposal and benefits:**
<!-- A clear and concise description of what you want to happen. -->

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**(2) Describe alternatives you've considered:**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**(3) Design / Screenshots / Mockups:**
<!-- Add any other context or screenshots about the feature request here. -->
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
> [!NOTE]
> I am [looking for a new maintainer](https://github.com/orgs/forge-ext/discussions/276) of this extension.
> I will archive this at the end of the year if no one takes it.
# Forge

Forge is a GNOME Shell extension that provides tiling/window management.
Expand Down Expand Up @@ -27,6 +31,7 @@ Forge is a GNOME Shell extension that provides tiling/window management.
![image](https://user-images.githubusercontent.com/348125/146386593-8f53ea8b-2cf3-4d44-a613-bbcaf89f9d4a.png)

## Forge Keybinding Defaults
See the acceptable key combinations on the [wiki](https://github.com/forge-ext/forge/wiki/Keyboard-Shortcuts)

| Action | Shortcut |
| --- | --- |
Expand Down
16 changes: 14 additions & 2 deletions lib/extension/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,17 @@ export class Node extends GObject.Object {
set tile(value) {
this.float = !value;
}

resetLayoutSingleChild() {
let tabbedOrStacked = this.isTabbed() || this.isStacked();
if (tabbedOrStacked && this.singleOrNoChild()) {
this.layout = LAYOUT_TYPES.HSPLIT;
}
}

singleOrNoChild() {
return this.childNodes.length <= 1;
}
}

/**
Expand Down Expand Up @@ -947,14 +958,15 @@ export class Tree extends Node {
}
this.resetSiblingPercent(parentNode);
this.resetSiblingPercent(parentTarget);
parentNode.resetLayoutSingleChild();
return true;
}

/**
* Give the next sibling/parent/descendant on the tree based
* on a given Meta.MotionDirection
*
* @param {Tree.Node} node
* @param {Node} node
* @param {Meta.MotionDirection} direction
*
* Credits: borrowed logic from tree.c of i3
Expand Down Expand Up @@ -1608,7 +1620,7 @@ export class Tree extends Node {
if (node.rect) {
attributes += `,rect:${node.rect.width}x${node.rect.height}+${node.rect.x}+${node.rect.y}`;
const pointerCoord = global.get_pointer();
const pointerInside = Utils.rectContainsPoint(node.rect, pointerCoord) ? 'yes' : 'no';
const pointerInside = Utils.rectContainsPoint(node.rect, pointerCoord) ? "yes" : "no";
attributes += `,pointer:${pointerInside}`;
}

Expand Down
Loading

0 comments on commit b307d8b

Please sign in to comment.