Bug 131345 - [PATCH] make alttab work when the pointer is grabbed
Summary: [PATCH] make alttab work when the pointer is grabbed
Alias: None
Product: Fedora
Classification: Fedora
Component: metacity   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-31 10:43 UTC by Hans de Goede
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-10 05:14:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch (1.44 KB, patch)
2004-08-31 10:44 UTC, Hans de Goede
no flags Details | Diff

Description Hans de Goede 2004-08-31 10:43:35 UTC
When you press alttab and an application has got the pointer grabbed,
nothing happens instead of switching to the next window.

This might be related to display.c line 3054:
  /* FIXME:
   *   If we have no MetaWindow we do our best
   *   and try to do the grab on the RootWindow.
   *   This will fail if anyone else has any
   *   key grab on the RootWindow.
  if (window)
    grab_xwindow = window->frame ? window->frame->xwindow : 
    grab_xwindow = screen->xroot;

What happens is that do_change_window() in keybindings.c calls
meta_display_begin_grab_op() which fails because the pointer is
already grabbed.

The attached patch fixes this by just switching to the next window in
the tablist when meta_display_begin_grab_op() fails, so this doesn't
fix the problem completly (keeping alt pressed still won't work), but
it is better then doing nothing at all.

A real life example of this problem is xmame, which when requested by
the user will grab the mouse, this is actually kinda handy when
playing games. xmame will release the grab when it looses focus, this
works fine with other wm's but fails with metacity because of the
above reasons.

Comment 1 Hans de Goede 2004-08-31 10:44:05 UTC
Created attachment 103284 [details]

Comment 2 Hans de Goede 2004-08-31 10:47:18 UTC
p.s. also submitted upstream:

But that you already know.

Comment 3 Havoc Pennington 2004-11-10 05:14:22 UTC
Closing here, simpler to just track it at gnome.org.

Note You need to log in before you can comment on or make changes to this bug.