GNOME Bugzilla – Bug 478371
totem volume slider appears on all workspaces
Last modified: 2008-01-24 13:58:38 UTC
If you select the totem volume slider, it appears on all workspaces until it is dismissed, even though totem itself is only on the first workspace. totem-2.20.0-1.fc8 gtk2-2.12.0-2.fc8 metacity-2.20.0-1.fc8
The popup also doesn't pop down if the main window is deactivated. xwininfo: Window id: 0x20001e0 "Totem Movie Player" Absolute upper-left X: 538 Absolute upper-left Y: 609 Relative upper-left X: 538 Relative upper-left Y: 609 Width: 23 Height: 154 Depth: 24 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: yes Map State: IsViewable Override Redirect State: yes Corners: +538+609 -1119+609 -1119-287 +538-287 -geometry 23x154+538+609 This is hard one because the popup gets the focus, even though the window manager focus is still on the movie player window. I tried checking the is-active and has-toplevel-focus properties, but they're FALSE for the main window even though it still has the window manager focus...
The issue here is that totem has 2 scale buttons, and gtk_scale_button_grab_notify() does not check if the popup is actually visible before it removes the pointer and keyboard grabs. What happens is that the second scale button yanks the grabs from underneath the first scale button... Adding a g_object_get (priv->dock, "visible", &visible, NULL); if (!visible) return; should fix the problem
Created attachment 96624 [details] [review] gtk-scale-button-dont-ungrab-not-us.patch Patch to implement Matthias' suggestion (untested)
Works great, can we get this in trunk and 2.12 branch? I've fixed totem itself as well in bug #477529
Created attachment 96631 [details] [review] gtk-scale-button-dont-ungrab-not-us-2.patch Updated to check the more obvious "do we have the grab we want to release", as pointed out by Matthias.
Created attachment 96632 [details] [review] gtk-scale-button-dont-ungrab-not-us-2.patch Updated to check the more obvious "do we have the grab we want to release", as pointed out by Matthias.
Bugzilla doesn't like me right now.
2007-10-04 Matthias Clasen <mclasen@redhat.com> * tests/testvolumebutton.c: Add a second volume button. * gtk/gtkscalebutton.c: Doh, don't release grabs we don't hold. (#478371, reported by Bill Nottingham)
*** Bug 475545 has been marked as a duplicate of this bug. ***
*** Bug 511786 has been marked as a duplicate of this bug. ***