Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not grab pointer for the window #30

Closed
TripleK2004 opened this issue Nov 24, 2021 · 5 comments
Closed

Could not grab pointer for the window #30

TripleK2004 opened this issue Nov 24, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@TripleK2004
Copy link

TripleK2004 commented Nov 24, 2021

Running Ubuntu 20.04. Installed all dependencies and the build went fine. The taskbar works fine other than that, the rest of the module windows appear for a second and report errors as such

Could not grab pointer for the window 27263046
Could not grab pointer for the window 27263055
Could not grab pointer for the window 27263062
Could not grab pointer for the window 27263069

Tested in OpenBox

@jmanc3
Copy link
Owner

jmanc3 commented Nov 24, 2021

Will look into

@jmanc3
Copy link
Owner

jmanc3 commented Nov 26, 2021

As I feared would happen, I wasn't able to reproduce your issue. I installed Ubuntu 20.04.3 LTS on a virtual machine, updated and upgraded all the packages, git cloned Winbar, installed all the compilation dependencies, unziped the icons, and ran the install script and then tested it out on both Openbox and GNOME and everything worked fine: popup menus didn't close after opening them.

Do me a favor and open the file: "src/taskbar.cpp"; go to line 3031; and change it from:

printf("Could not grab pointer for the window %d\n", window);

To:
printf("Could not grab button on root: %d, for window: %d, error_code: %d\n", app->screen->root, window, error->error_code);

recompile (run the install script again, that is)

and show me what it prints then.

@jmanc3 jmanc3 added the bug Something isn't working label Nov 26, 2021
@TripleK2004
Copy link
Author

Sorry for the late reply , i lost my previous ubuntu install . But im using Debian 11 bullseye as of now and I did exactly what you said , here is the output when i click random bar modules

Could not grab button on root: 417, for window: 96469028, error_code: 10
Could not grab button on root: 417, for window: 96469037, error_code: 10
Could not grab button on root: 417, for window: 96469044, error_code: 10
Could not grab button on root: 417, for window: 96469056, error_code: 10
Could not grab button on root: 417, for window: 96469075, error_code: 10
Could not grab button on root: 417, for window: 96469083, error_code: 10

What I suspect is that there is some Xorg related dependency that is missing, i usually build apt debian ubuntu systems through the debootstrap way where I have declared not to install suggested and recommended packages. So i donot have the entire xorg meta package. It would be great if you could tell me what specific package I am missing : )

@jmanc3
Copy link
Owner

jmanc3 commented Dec 2, 2021

That error code means that "Another client has already issued a GrabButton with the same button/key combination on the same window." How exactly that's occurring, I don't know, and because I can't debug it locally, I won't be able to figure it out, unfortunately.

I think you might be on to something with your suggesting that it's a missing package problem but, it seems unlikely to me that the function that is generating the error xcb_grab_button_checked is missing a dependency or something. Especially with the error code it gives, which makes it seem like someone else (the window manager I expect: GNOME, Openbox, or whatever) is grabbing the mouse, for some reason, before we can.

The reason we close the menu instead of just letting the program continue as if everything was okay is because if we can't take ownership of the mouse when the menu is opened, then we won't know when you click somewhere outside of it and be able to close it for you. That'll mean the window will be left open---unable to be closed.

A test you could run is to remove the line that is right after the one I told you to change and see what happens.
It will be the one that says:
client_close_threaded(app, client);

But the real fix to the problem can only come if I figure out some way to reproduce it on my end and can debug it.

@TripleK2004
Copy link
Author

TripleK2004 commented Dec 3, 2021

Happened just as you said , turns out it was due to an imwheel session that i was running. My bad : ) Thanks for the support. Nice project btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants