0

I want to recreate what DockBarX does but in Java. So I need to be able to query the top level windows in X11 (I can do that already) find the PID (got that too : _NET_WM_PID) but then map that to the application that created the window. I need to find which .desktop file (stored in /usr/share/applications) was launched that created the top-level window. But the pid is not really helpfull, often the pid could be a child process of another process which makes things complicated.

How does DockBarX do it? I'm trying to look thru source but my python knowledge is very limited.

Thanks.

Peter Quiring
  • 1,648
  • 1
  • 16
  • 21
  • found out that DockBarX uses libwnck (Window Navigator Construction Kit) to query this info https://developer.gnome.org/libwnck/stable/ – Peter Quiring Jan 12 '14 at 01:41
  • overall it seems as though they use the title of the window to try and match it to .desktop files. This seems very unreliable to me and I know will not work in all cases. I was going to use _NET_WM_PID but it too is very unreliable and often not set by clients. – Peter Quiring Jan 12 '14 at 18:37
  • You cannot know for sure which .desktop file was used, this information is not remembered anywhere. – n. m. could be an AI Jan 18 '14 at 14:51

0 Answers0