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

XGetInputFocus returned the focused window of 1. This is likely a bug in the X server. #9

Closed
whitehander opened this issue Nov 26, 2019 · 9 comments
Labels
bug Something isn't working unknown or hard Unknown or hard bug

Comments

@whitehander
Copy link

whitehander commented Nov 26, 2019

Hi, I appreciate your work.
I using iMac at home and Macbook pro at office.
Both of MacOS version is Catalina.
On iMac, it works. But on a MacBook, below error occurs from every command.
And XQuartz app is showing on Dock.
Could you like to help me?

XGetInputFocus returned the focused window of 1. This is likely a bug in the X server.
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x1
  Serial number of failed request:  20
  Current serial number in output stream:  20
@black7375
Copy link
Owner

black7375 commented Nov 28, 2019

It seems to be a problem with xdotool.

I'm sorry but I'm busy right now.. 😂
I will check it next week.

@black7375 black7375 added the bug Something isn't working label Nov 28, 2019
@black7375
Copy link
Owner

black7375 commented Dec 5, 2019

First of all, the error seems to occur here.
https://github.com/jordansissel/xdotool/blob/a7903d0fdad57e12209b77d9126587a6f9aa87dc/xdo.c#L1137

Are the following packages installed correctly?

  • xquartz, wmctrl, xdotool

If not, install it with the following command:

brew cask install xquartz
brew install wmctrl xdotool

If they are installed, can you execute the following command?

  • xdotool getactivewindow getwindowname

Then tell me the results.


If this doesn't work, the problem is a bit complicated because it's different from the outside or the environment. So it can be hard to fix early.
The temporarily workaround is to disable the notification feature.

Comment out the following line:

zplugin ice wait"2" atload"_zsh-notify-setting" lucid
zplugin light marzocchi/zsh-notify

zplugin ice wait"2" atload"_zsh-notify-setting" lucid

@whitehander
Copy link
Author

Thanks for your kind answer.

After reinstall xquartz, wmctrl, xdotool, change error messages.
And XQuartz app was not showing.

Here are that error messages.

~/Pictures ❯ xdotool getactivewindow getwindowname
Error: Can't open display: (null)
Failed creating new xdo instance
Error: Can't open display: (null)
Failed creating new xdo instance
zsh-notify: Error: Can't open display: (null)                                                                                
zsh-notify: Failed creating new xdo instance

@black7375
Copy link
Owner

black7375 commented Dec 6, 2019

As far as I know, the general solution is this:

export DISPLAY=':0.0'
export XAUTHORITY=~/.Xauthority

(Add to ~/.zshrc && restart terminal)

If that doesn't work, let's find another solution.

@whitehander
Copy link
Author

Already tried that solution, but still showing.

Can't open display: (null)

So, I just disabled zsh-notify plugin that you said.

Thank you.

@black7375 black7375 added the unknown or hard Unknown or hard bug label Dec 6, 2019
@ygm521
Copy link

ygm521 commented Apr 15, 2024

The resolution of this issue???
image

@black7375
Copy link
Owner

@whitehander How about disabling marzocchi/zsh-notify?

@whitehander
Copy link
Author

Hello! @black7375 😀
It's been a while! I used to write a lot, but I haven't been doing it lately.
I can't remember much, but it seems like things were going well back then.

@black7375
Copy link
Owner

Thanks!!


@ygm521 Consider disabling marzocchi/zsh-notify.
If you're still having trouble afterward, I'll open a new issue.

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

No branches or pull requests

3 participants