After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478371 - totem volume slider appears on all workspaces
totem volume slider appears on all workspaces
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 475545 511786 (view as bug list)
Depends on:
Blocks: 477529
 
 
Reported: 2007-09-19 18:40 UTC by Bill Nottingham
Modified: 2008-01-24 13:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
gtk-scale-button-dont-ungrab-not-us.patch (595 bytes, patch)
2007-10-04 11:15 UTC, Bastien Nocera
none Details | Review
gtk-scale-button-dont-ungrab-not-us-2.patch (774 bytes, patch)
2007-10-04 12:48 UTC, Bastien Nocera
none Details | Review
gtk-scale-button-dont-ungrab-not-us-2.patch (774 bytes, patch)
2007-10-04 12:48 UTC, Bastien Nocera
none Details | Review

Description Bill Nottingham 2007-09-19 18:40:58 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
Comment 1 Bastien Nocera 2007-09-23 02:42:55 UTC
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...
Comment 2 Matthias Clasen 2007-10-04 06:40:43 UTC
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
Comment 3 Bastien Nocera 2007-10-04 11:15:15 UTC
Created attachment 96624 [details] [review]
gtk-scale-button-dont-ungrab-not-us.patch

Patch to implement Matthias' suggestion (untested)
Comment 4 Bastien Nocera 2007-10-04 12:00:24 UTC
Works great, can we get this in trunk and 2.12 branch?

I've fixed totem itself as well in bug #477529
Comment 5 Bastien Nocera 2007-10-04 12:48:16 UTC
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.
Comment 6 Bastien Nocera 2007-10-04 12:48:16 UTC
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.
Comment 7 Bastien Nocera 2007-10-04 12:50:36 UTC
Bugzilla doesn't like me right now.
Comment 8 Matthias Clasen 2007-10-04 13:00:24 UTC
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)
Comment 9 Bastien Nocera 2007-10-05 16:39:35 UTC
*** Bug 475545 has been marked as a duplicate of this bug. ***
Comment 10 Bastien Nocera 2008-01-24 13:58:38 UTC
*** Bug 511786 has been marked as a duplicate of this bug. ***