forge-ext / forge

Forge - Tiling and Window Manager for Gnome-Shell
GNU General Public License v3.0
855 stars 41 forks source link

bug: can't disable move pointer with focus #343

Closed p1gp1g closed 5 months ago

p1gp1g commented 5 months ago

(1) Issue/Bug Description/Video Capture/Screenshots

Since #310 there is an option to move the pointer with the focus. This is fine for users wanting it and very strange for other users, if this is not something you are waiting for, it looks like a bug. I think this setting should be off by default.

Even if I disable that setting, the behavior is still the same: my pointer is moving around when I change workspace which makes the extension unusable for me (I've checkout to 4128dcc17871a4349b088a5245cbc29bf55d4d08, and add chattr +i to avoid auto update)

This is even worse with multiple screens, or when using navigation with a scroll on the topbar

(2) Steps to reproduce

  1. Disable move pointer with focus
  2. Open some windows on a first workspace
  3. Switch to another workspace and open some windows
  4. Navigate to the previous workspace: the pointer is moving somewhere

(3) Distribution and Linux version

NAME="Fedora Linux"
VERSION="39.20240122.0 (Silverblue)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39.20240122.0 (Silverblue)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:39"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://silverblue.fedoraproject.org"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-silverblue/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://github.com/fedora-silverblue/issue-tracker/issues"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=39
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=39
SUPPORT_END=2024-11-12
VARIANT="Silverblue"
VARIANT_ID=silverblue
OSTREE_VERSION='39.20240122.0'
Linux fedora 6.6.12-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jan 16 01:35:44 UTC 2024 x86_64 GNU/Linux

(4) Journal Logs from the last hour

I've to do it in a vm, I did some debug with different versions

GNOME Shell version

GNOME Shell 45.3

Forge version

4c4b913c7ff3443f70fd08a6e340c891c3dba358

Other installed/enabled extensions

appindicatorsupport@rgcjonas.gmail.com
  Name: AppIndicator and KStatusNotifierItem Support
  Description: Adds AppIndicator, KStatusNotifierItem and legacy Tray icons support to the Shell
  Path: /var/home/sim/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com
  URL: https://github.com/ubuntu/gnome-shell-extension-appindicator
  Version: 57
  State: ENABLED

space-bar@luchrioh
  Name: Space Bar
  Description: Replaces the top-panel workspace indicator with an i3-like workspaces bar.

Originally a fork of the extension Workspaces Bar by fthx, this extension grew into a more comprehensive set of features to support a workspace-based workflow.

Features:
-   First class support for static and dynamic workspaces as well as multi-monitor setups
-   Add, remove, and rename workspaces
-   Rearrange workspaces via drag and drop
-   Automatically assign workspace names based on started applications
-   Keyboard shortcuts extend and refine system shortcuts
-   Scroll through workspaces by mouse wheel over the panel
-   Customize the appearance
  Path: /var/home/sim/.local/share/gnome-shell/extensions/space-bar@luchrioh
  URL: https://github.com/christopher-l/space-bar
  Version: 24
  State: ENABLED

forge@jmmaranan.com
  Name: Forge
  Description: Tiling and window manager for GNOME

Please report bugs/issues on https://github.com/forge-ext/forge/issues
  Path: /var/home/sim/.local/share/gnome-shell/extensions/forge@jmmaranan.com
  URL: https://github.com/forge-ext/forge
  Version: 77
  State: ENABLED

(6) Monitor Setup

Primary: 2560x1440, on top Secondary: 1920x1080, bellow

Workspaces on primary display only

Other Notes

No response

p1gp1g commented 5 months ago

So I think it is older than the pointed commit. I'll dig into this later today

Kostrol commented 5 months ago

I'm experiencing unexpected behavior with window focus mouse positioning on v77, the pointer will persistently jump to the top left edge of the newly focused window on X11 using keyboard shortcuts. Hoping this new fix might get it working normally again.

jmmaranan commented 5 months ago

Hi @Kostrol, the code has been merged to main. Would you be able to test if it fixes your issue? Thanks!

Kostrol commented 5 months ago

Hi @Kostrol, the code has been merged to main. Would you be able to test if it fixes your issue? Thanks!

Thank you.

https://github.com/forge-ext/forge/commit/42b52904d9d5bad3b34a2b34bfec3df0f51fd04d

Windows now somewhat approximately remember the last known pointer position when switching window focus back and fourth, no longer the issue I had.

In my opinion It's still doing some odd behavior of putting the pointer in the top middle title bar instead of e.g the middle for newly opened and tiled windows, as well as being finicky with two different oriented monitors. I'm also seeing an issue a lot more now where the focus will get locked to windows within my primary monitor and not being able to window-focus switch back to my secondary, but that might be another issue.

I'm a little confused about this "option to move the pointer with the focus", where and how is this option configured exactly? I'm used to switching focus independently of mouse, so having it be unaffected and not snap to the new window would be a good option to have also. I end up losing track of the pointer most of the time.

p1gp1g commented 5 months ago

You have to turn this off here

image

Kostrol commented 5 months ago

Seems like i was missing a lot of details here, my bad. I saw the commit was for the one file and assumed this was the issue, but i was missing quite a lot of changes. This option did not exist for me through the gnome extensions version that I have been using up to this point, no wonder I was having issues seemingly out of nowhere. I'm just going to clone from here in the future, to be honest I'm still confused as to how and when this happened.

Screenshot from 2024-01-27 17-29-24

p1gp1g commented 5 months ago

You have to clone this repo then run the following, you may need to install some packages (you'll see if you get any error message) :


make build
make install
Kostrol commented 5 months ago

OK so forgive me if I'm still making some mistakes here.

I've cloned the main repo, built and installed, this build works very well for me, I'm not sure if this is the same one we're talking about here.

However, it seems to be stuck in this loop where it will prompt an update for this build with the next restart, when it does it will revert these changes and remove the option all-together.

Screenshot from 2024-01-28 18-33-36

Screenshot from 2024-01-28 18-36-06

With this newly updated build I am back to my issue of the cursor jumping back to the top edge, with no way to turn it off because the option is gone, so if THIS is the right build, then it's not working for me.

jmmaranan commented 5 months ago

However, it seems to be stuck in this loop where it will prompt an update for this build with the next restart, when it does it will revert these changes and remove the option all-together.

It should be: make build && make debug && make install

Kostrol commented 5 months ago

That did it, thank you. First login without the prompt. Build is now marked 45.3-5999, hopefully this is correct.

Thank you for the help and clarification.

Fixed my original issue. I will leave the move pointer with focus disabled for now - currently it has some issues in particular with dash to panel as the mouse tends jump back around on previous focused windows when I don't want it to, otherwise if strictly used as a tiling window manager feature it works I'm sure.