Bug 131345 - [PATCH] make alttab work when the pointer is grabbed
[PATCH] make alttab work when the pointer is grabbed
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: metacity (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-31 06:43 EDT by Hans de Goede
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-10 00:14:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 06:44 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2004-08-31 06:43:35 EDT
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 : 
  else
    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 06:44:05 EDT
Created attachment 103284 [details]
patch
Comment 2 Hans de Goede 2004-08-31 06:47:18 EDT
p.s. also submitted upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=151500

But that you already know.
Comment 3 Havoc Pennington 2004-11-10 00:14:22 EST
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.