GNOME Bugzilla – Bug 478309
[GtkScaleButton] Add way to control popup presence
Last modified: 2009-09-04 13:14:00 UTC
+++ This bug was initially created as a clone of Bug #477529 +++ Please describe the problem: Under very specific circumstances are the fullscreen controls never removed, even when leaving fullscreen mode. Steps to reproduce: 1. Start totem, load a movie and enter fullscreen mode 2. When in fullscreen, click on the volume button so the slider is shown 3. Press the Escape button to cancel the volume slider Actual results: The result is that the popups don't get removed, ever. Not even leaving fullscreen mode helps Expected results: The same behaviour as when the volume slider is removed due to clicking the mouse button outside the slider. Does this happen every time? Yes Other information: The cause of this bug is that the volume sliders release event callback (totem_fullscreen_vol_slider_released_cb) never gets called when it's been closed with the Escape key (only when clicking ouside the volume slider), thus the totem->fs->vol_lock remains TRUE with the effect that the timer callback (totem_fullscreen_popup_hide) that should remove the popup is cancelled. We need a way to know that the dock has been popped up. Could we add a read/write property to do that in 2.12?
Created attachment 95845 [details] [review] gtk-scale-button-add-popup-visible-property.patch Adds the popup-visible read-write property, and use it in the test app.
Seems to work for me. Are you still seeing this issue ?
No, but the code I'm using to detect whether the popup is visible and popping it down are sub-par. Checking it's visible: static GtkWidget * totem_fullscreen_get_volume_popup (TotemFullscreen *fs) { return gtk_widget_get_toplevel (GTK_SCALE_BUTTON (fs->volume)->plus_button); } static gboolean totem_fullscreen_is_volume_popup_visible (TotemFullscreen *fs) { GtkWidget *toplevel; /* FIXME we should use the popup-visible property instead */ toplevel = totem_fullscreen_get_volume_popup (fs); return GTK_WIDGET_VISIBLE (toplevel); } Popping it down: /* Popdown the volume button if it's visible */ if (totem_fullscreen_is_volume_popup_visible (fs)) gtk_bindings_activate (GTK_OBJECT (fs->volume), GDK_Escape, 0); A property would be nicer.
Ok, fair point. How about making it more similar to the corresponding combobox property ? GtkComboBox::popup-shown is readonly
(In reply to comment #4) > Ok, fair point. > > How about making it more similar to the corresponding combobox property ? > > GtkComboBox::popup-shown is readonly We'd need to read-write, or add popup/popdown functions as in GtkComboBox (gtk_combo_box_popup and gtk_combo_box_popdown)
GtkScaleButton::popup-shown property and _popup/_popdown accessors it will be then.
Using: GTK_WIDGET_VISIBLE (gtk_scale_button_get_popup (GTK_SCALE_BUTTON (button))) actually works fine, so closing.