alt-f6 doesn't reliably switch between windows within an application

Bug #72732 reported by Christopher Armstrong
12
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Wishlist
Metacity
Fix Released
High
gnome-terminal (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Perhaps this is not very important, since I can't actually see that alt-f6 is *advertised* anywhere (for example, it is not in the "Window Shortcut Keys" of the Gnome Desktop Guide), but I remember reading about the feature in a release announcement of Gnome.

Anyway, alt-f6 is supposed to switch between windows of a particular application: for example, open up multiple firefox windows, make sure one of them is focused, and hit alt-f6, and it will pop up a box much like the one that appears for alt-tab, but restricted to firefox windows. For firefox, this works great, but for the applications for which I would find it most useful, it doesn't. Try it with multiple Terminal windows or multiple Emacs windows, and you will only find the current window in the list of selections on alt-f6.

I imagine that the criteria metacity is using for trying to figure out if a window is part of the same application are just not very good. A while back I remember writing some code for sawfish that used the X window's "group" property, or something like that; it may be useful to investigate that.

I might consider this a "bug", if not a regression, but probably a minor one.

Revision history for this message
Marnanel Thurman (marnanel) wrote :

Hi, I'm the author of the upstream alt-f6 code. It does actually use the X window's "group" property. It appears to me that the problem is that multiple gnome-terminals don't have the same "group" property as one another. You can add the debugging statement below to demonstrate this. Unless I'm mistaken here, this should probably be a bug against gnome-terminal.

Revision history for this message
Dean Sas (dsas) wrote :

I've forwarded the bug to gnome-terminal upstream.

Changed in metacity:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gnome-terminal:
assignee: nobody → desktop-bugs
Changed in gnome-terminal:
status: Unknown → Confirmed
Changed in metacity:
status: Unknown → Fix Released
Revision history for this message
Christopher Armstrong (radix) wrote :

This is rather disappointing, given that it also doesn't work with other applications like Emacs.

* Is there a way for me to easily get the Group name of arbitrary windows? xwininfo doesn't provide it, as far as I can tell. Even something that's accessible through a Python interpreter would be fine. I guess I could do a little ctypes-ing...

* Are there any other potential sources of information to determine which windows are from the same application, that you can think of?

Changed in gnome-terminal:
status: Confirmed → Fix Released
Revision history for this message
Marnanel Thurman (marnanel) wrote :

"Group name" is slightly incorrect: if a window's in a group, it has a field pointing to a(nother) window's ID, and all the windows which have that ID are in the group. The window which is pointed to is called the "group leader" and doesn't even have to be mapped.

xwininfo doesn't know about groups, but xprop does:

tthurman@haematite:~$ xprop|grep group
  window id # of group leader: 0x2400001

(where I clicked on Firefox in between.)

Specs for this are at http://tronche.com/gui/x/icccm/sec-4.html -- search throughout for "group".

Hope this helps!

Revision history for this message
Marnanel Thurman (marnanel) wrote :

Oh: yes, there are other ways to tell whether the windows are from the same application. The most immediately obvious ones are the optional WM_CLIENT_MACHINE and _NET_WM_PID properties, which would give you the process ID of the owning application:

http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507760

Beyond that we'd be getting into window matching territory, looking at title strings and icon bitmaps and so on.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

fixed upstream, thanks for reporting.

Changed in gnome-terminal:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-terminal - 2.23.91-0ubuntu1

---------------
gnome-terminal (2.23.91-0ubuntu1) intrepid; urgency=low

  * New upstream release
    - gnome-terminal crashed with SIGSEGV in free() (LP: #260838)
    - Multiple gnome-terminals don't have the same X group property
      Reverts the patch from bug #115994, since it breaks window
      switching with Alt-F6 in metacity (and also didn't offer a real
      rationale for making each window be its own group leader).
      (LP: #72732)
  * debian/control.in:
    - Bump up libgtk build-depend to 2.13.6
  * debian/patches/99_autoreconf.patch:
    - Refresh for new release

 -- Pedro Fragoso <email address hidden> Sun, 31 Aug 2008 02:00:46 +0100

Changed in gnome-terminal:
status: Fix Committed → Fix Released
Changed in gnome-terminal:
importance: Unknown → Wishlist
Changed in metacity:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.