! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Popping up the menu breaks the panel to be hidden
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Windows Menu

Comments

Description Mike Massonnet editbugs 2008-02-17 01:57:50 CET
With a panel set as auto-hide, the windowlist plugin breaks this behavior once its menu is shown.  The panel will be left shown unless xfce4-panel is restarted.
Comment 1 Nick Schermer editbugs 2008-08-02 15:07:34 CEST
That probably because the menu is not deactivated. The panel register_menu function locks auto-hide until the menu is deactivated.

Brian?
Comment 2 Brian J. Tarricone (not reading bugmail) 2008-08-27 10:43:55 CEST
What do you mean by 'deactivated'?  Does the plugin have to do something special when a menu closes?
Comment 3 Nick Schermer editbugs 2008-08-27 10:54:27 CEST
When calling xfce_panel_plugin_register_menu() an internal counter is increased to prevent the panel from autohide.

It also connects a "deactivate" signal to decrease this counter when the menu is closed. When 'somehow' the menu does not emit this signal, to panel will stay locked.

When looking at the code it seems to break when the signal is connected 2 times, so I'll fix that tonight.

To check the plugin side, you can connect a "deactivate" signal to see if it gets emitted when the menu is closed. If not, maybe the "destroy" signal is, but i suppose "deactivate" is always emitted before "destroy".
Comment 4 Brian J. Tarricone (not reading bugmail) 2008-08-27 11:15:57 CEST
Er, looking at Mike's comment again... this is about the window list plugin, not the menu plugin.  I didn't write the window list plugin.
Comment 5 Nick Schermer editbugs 2008-08-27 11:19:32 CEST
Hehe, and I was thinking, "Ahhh Brian is such a curious guy" ^_^.
Comment 6 Mike Massonnet editbugs 2009-06-28 17:24:03 CEST
*** Bug 5486 has been marked as a duplicate of this bug. ***
Comment 7 Mike Massonnet editbugs 2009-11-02 14:31:40 CET
Created attachment 2648 
move gtk_widget_destroy inside a idle task

The bug doesn't come from the xfce_panel_plugin_position_menu callback (which calls xfce_...register_menu), it is because the menu is destroyed on the deactivate signal. If it is postponed with a g_idle_add it works fine.
Comment 8 Nick Schermer editbugs 2009-11-02 16:48:58 CET
FYI: there is also exo_gtk_object_destroy_later. Will take a look at this.
Comment 9 Mike Massonnet editbugs 2009-11-02 19:00:45 CET
(In reply to comment #8)
> FYI: there is also exo_gtk_object_destroy_later. Will take a look at this.

Convenient :) I never knew about it.
Comment 10 Nick Schermer editbugs 2010-02-02 19:22:19 CET
Fixed in b1fdd70.

Bug #3853

Reported by:
Mike Massonnet
Reported on: 2008-02-17
Last modified on: 2010-02-02
Duplicates (1):
  • aSa Using the window list breaks autohiding.

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
Unspecified

Attachments

Additional information