Is it possible to create a small program that runs in the background/systray/wherever that can capture when windows gain and lose focus, or when a window title changes (for example when changing tabs in a browser)?

Are there any API hooks or other ways of doing this in any Linux WM or desktop?

asked 02 Aug '10, 07:36

Kurtosis's gravatar image

accept rate: 50%

Yes, it is possible to write such a program. You should have a look at Chapter 10 of the Xlib Programming Manual for information on events generated when window focus changes. As far as window titles are concerned, the ICCCM and EWMH specs would be a good place to start.


answered 17 Aug '10, 05:04

Saleem%20Abdulrasool's gravatar image

Saleem Abdul...
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 02 Aug '10, 07:36

Seen: 2,867 times

Last updated: 14 Sep '10, 05:24

powered by OSQA