mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Add a private gtk-mutter protocol
Add a new interface, gtk_shell, than can be used by gtk to retrieve a surface extension called gtk_surface, which will be used to communicate with mutter all the GTK extensions to EWMH https://bugzilla.gnome.org/show_bug.cgi?id=707128 Add support for GTK application menus To do so, we need to be able to set surface state before creating the MetaWindow, so we introduce MetaWaylandSurfaceInitialState as a staging area. The gtk-shell-surface implementation would either write to the initial state, or directly to the window. At the same, implement set_title and set_class too, because it's easy enough. https://bugzilla.gnome.org/show_bug.cgi?id=707128
This commit is contained in:

committed by
Jasper St. Pierre

parent
cad9e14463
commit
a26ded47d9
@ -65,6 +65,19 @@ typedef struct
|
||||
struct wl_list frame_callback_list;
|
||||
} MetaWaylandDoubleBufferedState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *title;
|
||||
char *wm_class;
|
||||
|
||||
char *gtk_application_id;
|
||||
char *gtk_unique_bus_name;
|
||||
char *gtk_app_menu_path;
|
||||
char *gtk_menubar_path;
|
||||
char *gtk_application_object_path;
|
||||
char *gtk_window_object_path;
|
||||
} MetaWaylandSurfaceInitialState;
|
||||
|
||||
struct _MetaWaylandSurface
|
||||
{
|
||||
struct wl_resource *resource;
|
||||
@ -75,9 +88,14 @@ struct _MetaWaylandSurface
|
||||
MetaWaylandBufferReference buffer_ref;
|
||||
MetaWindow *window;
|
||||
gboolean has_shell_surface;
|
||||
gboolean has_gtk_surface;
|
||||
|
||||
/* All the pending state, that wl_surface.commit will apply. */
|
||||
MetaWaylandDoubleBufferedState pending;
|
||||
|
||||
/* All the initial state, that wl_shell_surface.set_* will apply
|
||||
(through meta_window_new_for_wayland) */
|
||||
MetaWaylandSurfaceInitialState *initial_state;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
@ -95,4 +113,7 @@ MetaWaylandSurface *meta_wayland_surface_create (MetaWaylandCompositor *composit
|
||||
guint32 version);
|
||||
void meta_wayland_surface_free (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_set_initial_state (MetaWaylandSurface *surface,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user