gnome-shell/src/shell-status-menu.h
Owen W. Taylor 1340413740 Fix hang when clicking on the user status menu in the overview
shell-global.[ch]: Add shell_global_display_is_grabbed() that
  uses the newly added meta_display_get_grab_op() to check
  for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
  check if the menu is popped up. Check for active grabs before
  popping the menu up. Use gtk_menu_popdown() rather than
  gtk_widget_hide(). Remove an excess gtk_widget_show() and
  some excess casts.
panel.js: Check whether the status menu is popped up after button
  release, and if it's not popped up, unhighlight the button.

Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362
2009-08-28 12:34:04 -04:00

46 lines
1.6 KiB
C

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_STATUS_MENU_H__
#define __SHELL_STATUS_MENU_H__
#include <clutter/clutter.h>
#include "big/box.h"
G_BEGIN_DECLS
#define SHELL_TYPE_STATUS_MENU (shell_status_menu_get_type ())
#define SHELL_STATUS_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_STATUS_MENU, ShellStatusMenu))
#define SHELL_STATUS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_STATUS_MENU, ShellStatusMenuClass))
#define SHELL_IS_STATUS_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_STATUS_MENU))
#define SHELL_IS_STATUS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_STATUS_MENU))
#define SHELL_STATUS_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_STATUS_MENU, ShellStatusMenuClass))
typedef struct _ShellStatusMenu ShellStatusMenu;
typedef struct _ShellStatusMenuPrivate ShellStatusMenuPrivate;
typedef struct _ShellStatusMenuClass ShellStatusMenuClass;
struct _ShellStatusMenu
{
BigBox parent_instance;
ShellStatusMenuPrivate *priv;
};
struct _ShellStatusMenuClass
{
BigBoxClass parent_class;
void (*deactivated) (ShellStatusMenu *status, gpointer user_data);
};
GType shell_status_menu_get_type (void);
void shell_status_menu_toggle (ShellStatusMenu *menu, ClutterEvent *event);
gboolean shell_status_menu_is_active (ShellStatusMenu *menu);
ClutterText *shell_status_menu_get_name (ShellStatusMenu *menu);
ClutterTexture *shell_status_menu_get_icon (ShellStatusMenu *menu);
G_END_DECLS
#endif /* __SHELL_STATUS_MENU_H__ */