zealdocs / zeal

Offline documentation browser inspired by Dash
https://zealdocs.org
GNU General Public License v3.0
11.36k stars 778 forks source link

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

Open farfromrefug opened 2 months ago

farfromrefug commented 2 months ago

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

trollixx commented 1 month ago

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

farfromrefug commented 1 month ago

@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 commented 1 month ago

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

farfromrefug commented 1 month ago

@trollixx i am on PopOS using X11