Re: [compiz] Getting the window having the focus
Wow, for a "kind of dead" mailing list, this is a lot of very helpful feedback in quite a short time ;) Thanks a lot to both of you, Raphael and Hannes! And Bill, I like your idea of using a kind of sub-window accuracy; taking the focussed widget into account for example. If I should find out how to do it, I promise to post it here. For now, thanks a lot again for this quick help which seems to be exactly what I wished for. I'm looking forward to playing around with this tomorrow :) Best regards, Christian signature.asc Description: This is a digitally signed message part ___ compiz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Getting the window having the focus
Addendum: You might also be interested in the atom _NET_WM_PID of a window that - if set - contains the process id of the process owning the window. By the way, three related links: The EWMH spec that describes _NET_WM_PID and other intersting atoms [1]. A nice hack for adding arbitrary atoms (e.g. the file name you passed to a viewer application) to a window on creation [2]. The Zeitgeist project already offers a daemon for collecting usage context (afaik not tracking the active window at the moment) [3] Raphael [1] http://standards.freedesktop.org/wm-spec/1.4/ [2] http://www.mail-archive.com/[email protected]/msg05806.html [3] http://zeitgeist-project.com/ On Wed, 28 Apr 2010 17:51:51 +0200, Christian Mertes wrote: Greetings! I'm currently gathering information that helps software in assessing the user's context. One very important such data would be the application that the user is currently working with which mostly is roughly equivalent to the name of the window that has the focus. Unfortunately I'm at a loss even about which API to ask for this information. As personally I am using compiz as a window manager, I'd be glad if anybody here could tell me about a way to get this information out of compiz, preferably without modifications to its code. If alternatively someone knows about ways to do this at a higher level (freedesktop, X, ...), I'd be happy about any hint. Many thanks in advance and best regards, Christian Mertes -- Dipl.-Medieninf. Raphael Wimmer Wiss. Mitarbeiter / Research Assistant LFE Medieninformatik E-Mail: [email protected] Ludwig-Maximilians-Universität München Skype: real_raphman Amalienstr. 17 / Raum 206 WWW: http://www.medien.ifi.lmu.de 80333 München Tel:+49 (89) 2180-4659 GermanyFax:+49 (89) 2180-99-4659 ___ compiz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Getting the window having the focus
Hi Christian, This is not really compiz-specific but should work with every window manager: The root window has an Atom _NET_ACTIVE_WINDOW which contains the window id. This is probably what you want. Try it out with: xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" Cheers, Raphael On Wed, 28 Apr 2010 17:51:51 +0200, Christian Mertes wrote: Greetings! I'm currently gathering information that helps software in assessing the user's context. One very important such data would be the application that the user is currently working with which mostly is roughly equivalent to the name of the window that has the focus. Unfortunately I'm at a loss even about which API to ask for this information. As personally I am using compiz as a window manager, I'd be glad if anybody here could tell me about a way to get this information out of compiz, preferably without modifications to its code. If alternatively someone knows about ways to do this at a higher level (freedesktop, X, ...), I'd be happy about any hint. Many thanks in advance and best regards, Christian Mertes -- Dipl.-Medieninf. Raphael Wimmer Wiss. Mitarbeiter / Research Assistant LFE Medieninformatik E-Mail: [email protected] Ludwig-Maximilians-Universität München Skype: real_raphman Amalienstr. 17 / Raum 206 WWW: http://www.medien.ifi.lmu.de 80333 München Tel:+49 (89) 2180-4659 GermanyFax:+49 (89) 2180-99-4659 ___ compiz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] Getting the window having the focus
A related issue in Compiz is knowing where the cursor is within an application window. When using the enhanced zoom desktop, if you zoom in, and then press Alt+Tab, the newly focused application scrolls into view. However, it just shows the middle of the window. In a gnome terminal, for example, the cursor is usually somewhere on the left side. So, if you find the answer, please post it back here. I'd be very interested in finding a way to start following the cursor. Bill On Wed, Apr 28, 2010 at 11:51 AM, Christian Mertes wrote: > Greetings! > > I'm currently gathering information that helps software in assessing the > user's context. One very important such data would be the application > that the user is currently working with which mostly is roughly > equivalent to the name of the window that has the focus. Unfortunately > I'm at a loss even about which API to ask for this information. As > personally I am using compiz as a window manager, I'd be glad if anybody > here could tell me about a way to get this information out of compiz, > preferably without modifications to its code. If alternatively someone > knows about ways to do this at a higher level (freedesktop, X, ...), I'd > be happy about any hint. > > Many thanks in advance and best regards, > > Christian Mertes > > > ___ > compiz mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/compiz > > ___ compiz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/compiz
