Martin, > I want to build a windowmanager (just for fun, not anything big, but > just a light version of blackbox or something like that). > I have a list of programs that the user can execute by pressing a key.
Look at the way WindowMaker handles this: - When a window pops up, it looks at the window class and name, whether they are already in the dock. If so, it marks the app in the dock as "Running". - If not, it makes a new "application icon", just like the icons in the dock, and places it in the icon area. - If the user pulls an icon from the icon area into the dock, it gets added, and WindowMaker records the start command from the session management properties. This way, you don't need to fiddle with PIDs, as they can change (different threads opening windows etc.). Just stick with the window class and name properties for recognizing when an app starts. Simon -- GPG Fingerprint: 040E B5F7 84F1 4FBC CEAD ADC6 18A0 CC8D 5706 A4B4
pgp00000.pgp
Description: PGP signature
