gnome-shell/src/shell-tray-manager.h

51 lines
1.8 KiB
C
Raw Normal View History

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_TRAY_MANAGER_H__
#define __SHELL_TRAY_MANAGER_H__
#include <clutter/clutter.h>
#include "st.h"
G_BEGIN_DECLS
#define SHELL_TYPE_TRAY_MANAGER (shell_tray_manager_get_type ())
#define SHELL_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_TRAY_MANAGER, ShellTrayManager))
#define SHELL_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_TRAY_MANAGER, ShellTrayManagerClass))
#define SHELL_IS_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_TRAY_MANAGER))
#define SHELL_IS_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_TRAY_MANAGER))
#define SHELL_TRAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_TRAY_MANAGER, ShellTrayManagerClass))
typedef struct _ShellTrayManager ShellTrayManager;
typedef struct _ShellTrayManagerPrivate ShellTrayManagerPrivate;
typedef struct _ShellTrayManagerClass ShellTrayManagerClass;
struct _ShellTrayManager
{
GObject parent_instance;
ShellTrayManagerPrivate *priv;
};
struct _ShellTrayManagerClass
{
GObjectClass parent_class;
void (* tray_icon_added) (ShellTrayManager *manager,
ClutterActor *icon,
const char *lowercase_wm_class);
void (* tray_icon_removed) (ShellTrayManager *manager,
ClutterActor *icon);
};
GType shell_tray_manager_get_type (void);
ShellTrayManager *shell_tray_manager_new (void);
Don't use ClutterX11TexturePixmap directly to embed docked windows Previously when a client requests that a window should be docked the shell would reparent the socket window onto the stage's window and then use ClutterX11TexturePixmap to get a texture to represent the window. This will not work if Clutter is no longer using the X11 winsys for example if it becomes its own display server. Instead this patch leaves the socket window as a child of the root window and lets mutter create a MetaWindow out of it. If Mutter is acting as a display server then this mechanism will still work via the headless x server. The ShellGtkEmbed instance now registers for notification of the ‘window-created’ signal of the display so that it can find the MetaWindow that gets created to represent the socket window. When this window is found it is prevented from being displayed on the screen by setting the actor's opacity to 0. An input shape is then set on the window to prevent it receiving any input. Instead of being a subclass of ClutterX11TexturePixmap, ShellGtkEmbed is now a subclass of ClutterClone. When the MetaWindow is found for the socket window the clone's source is set to the invisible actor for the window so it can be displayed in the panel as before. The ShellEmbeddedWindow no longer needs to know what the stage is because it no longer reparents the socket window. Therefore the ShellTrayManager doesn't need to know the stage either so shell_tray_manager_manage_stage has been replaced with just shell_tray_manager_manage_screen. https://bugzilla.gnome.org/show_bug.cgi?id=693438
2013-02-12 22:31:38 +00:00
void shell_tray_manager_manage_screen (ShellTrayManager *manager,
MetaScreen *screen,
StWidget *theme_widget);
G_END_DECLS
#endif /* __SHELL_TRAY_MANAGER_H__ */