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

Window does not get focus when in background using xdg-open on linux #1637

Open
farfromrefug opened this issue Jun 25, 2024 · 4 comments
Open

Comments

@farfromrefug
Copy link

If i use xdg-open to open a search in zeal from vscode:

  • if there is no zeal window open, the window opens and take focus => good
  • if there is a zeal window opened in background, the window stays in the background => no good
@trollixx
Copy link
Member

Are you using Dash extension for VS Code? I think it passes preventActivation=true parameter specifically to tell Zeal not to steal focus.

@farfromrefug
Copy link
Author

@trollixx yes i am using dash extension. Though it does not use preventActivation. It only calls something like this
xdg-open "dash-plugin://query=searchAll&keys=javascript,jquery,jqueryui,jquerym,react,angularjs,backbone,marionette,meteor,sproutcore,moo,prototype,bootstrap,foundation,lodash,underscore,ember,sencha,extjs,titanium,knockout,zepto,yui,d3,svg,dojo,coffee,nodejs,express,grunt,mongoose,moment,require,awsjs,jasmine,sails,sinon,chai,html,css,cordova,phonegap,unity3d"

I tried from the command line and i get the same behavior. If the zeal window is opened but in the background it does not go back to front. From the command line i also see this:

Gtk-Message: 09:49:42.258: Failed to load module "xapp-gtk3-module"                                                                                                                                                              
Qt: Session management error: Could not open network socket
zeal.core.applicationsingleton: Singleton ID: uLWoPI6UPkZw4a17GUVy9w5JXw7qTfvtwVIIlq0SmCk
zeal.core.applicationsingleton: Starting as a secondary instance. (Primary PID: 2)

@trollixx
Copy link
Member

What's your desktop environment? Is it Wayland based? I believe Qt window activation doesn't work on Wayland.

@farfromrefug
Copy link
Author

@trollixx i am on PopOS using X11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants