cornerman / i3-easyfocus

Focus and select windows in i3
GNU General Public License v3.0
172 stars 12 forks source link

"cannot focus window" #6

Closed bendem closed 8 years ago

bendem commented 8 years ago

Just cloned the repo, and built this tool. Running ./i3-easyfocus prints cannot focus window and does nothing.

I'm running 1f3274c with https://github.com/acrisci/i3ipc-glib/commit/8261412.

$ uname -a
Linux bendem-fedora-acer 4.4.6-300.fc23.x86_64 #1 SMP Wed Mar 16 22:10:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release 
NAME=Fedora
VERSION="23 (Workstation Edition)"
ID=fedora
VERSION_ID=23
PRETTY_NAME="Fedora 23 (Workstation Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:23"
HOME_URL="https://fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=23
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=23
PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
VARIANT="Workstation Edition"
VARIANT_ID=workstation
$ i3 --moreversion
Binary i3 version:  4.12 (2016-03-06, branch "4.12") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.12 (2016-03-06, branch "4.12") (pid 1720)
Loaded i3 config: /home/bendem/.config/i3/config (Last modified: Wed 06 Apr 2016 03:25:34 PM CEST, 169108 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
cornerman commented 8 years ago

Thanks for reporting! Can you please do a make clean debug and paste the output when running ./i3-easyfocus again?

bendem commented 8 years ago

https://gist.github.com/bendem/3a97e6991744d75ea21cdc176b44e290

cornerman commented 8 years ago

Oh good point! The ids should be unsigned; I was just following the docs from i3ipc-glib where it is signed.

Could you try with the branch issue6 whether it works?

bendem commented 8 years ago

Same result, different ipc error message: https://gist.github.com/bendem/3a97e6991744d75ea21cdc176b44e290#file-gistfile2-txt

cornerman commented 8 years ago

The con_id seems to be already overflowing when it is handled by i3ipc-glib as a gint, which is 4 bytes on my system. In i3, the con_id is actually the address of the corresponding con struct and is handled as a long when being printed or read - with a size of 8 bytes here.

Radivarig commented 5 years ago

This happens when I move a nested window out of its container, I cannot focus it anymore.

cornerman commented 5 years ago

@Radivarig Which version of i3ipc-glib are you using? This issue was fixed in i3ipc-glib with this commit https://github.com/acrisci/i3ipc-glib/commit/a7a29cf08221a180d747926b1715de1597cff768. Sadly, the last released version 0.6.0 does not include this fix :/

For a more detailed log of your problem, you can do:

make clean debug
./i3-easyfocus

It should give a more detailed output about what happens.

Radivarig commented 5 years ago

@cornerman ah.. you are correct. My version is 0.6.0. Thanks