forked from AuroraMiddleware/gtk
surface: Drop group api
This was only ever implemented on X11, and GTK is not using it at all. Relegate it to x11-specific api.
This commit is contained in:
parent
fed2db1493
commit
51b2759eb1
@ -277,8 +277,6 @@ gdk_surface_peek_children
|
||||
gdk_surface_set_icon_name
|
||||
gdk_surface_set_transient_for
|
||||
gdk_surface_set_startup_id
|
||||
gdk_surface_set_group
|
||||
gdk_surface_get_group
|
||||
gdk_surface_set_decorations
|
||||
gdk_surface_get_decorations
|
||||
GdkWMDecoration
|
||||
|
@ -782,22 +782,6 @@ gdk_broadway_surface_set_keep_below (GdkSurface *surface, gboolean setting)
|
||||
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_broadway_surface_get_group (GdkSurface *surface)
|
||||
{
|
||||
if (GDK_SURFACE_DESTROYED (surface) ||
|
||||
!SURFACE_IS_TOPLEVEL (surface))
|
||||
return NULL;
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_set_decorations (GdkSurface *surface,
|
||||
GdkWMDecoration decorations)
|
||||
@ -1357,8 +1341,6 @@ gdk_surface_impl_broadway_class_init (GdkSurfaceImplBroadwayClass *klass)
|
||||
impl_class->unfullscreen = gdk_broadway_surface_unfullscreen;
|
||||
impl_class->set_keep_above = gdk_broadway_surface_set_keep_above;
|
||||
impl_class->set_keep_below = gdk_broadway_surface_set_keep_below;
|
||||
impl_class->get_group = gdk_broadway_surface_get_group;
|
||||
impl_class->set_group = gdk_broadway_surface_set_group;
|
||||
impl_class->set_decorations = gdk_broadway_surface_set_decorations;
|
||||
impl_class->get_decorations = gdk_broadway_surface_get_decorations;
|
||||
impl_class->set_functions = gdk_broadway_surface_set_functions;
|
||||
|
@ -4628,43 +4628,6 @@ gdk_surface_set_keep_below (GdkSurface *surface,
|
||||
GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_keep_below (surface, setting);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_surface_get_group:
|
||||
* @surface: a toplevel #GdkSurface
|
||||
*
|
||||
* Returns the group leader surface for @surface. See gdk_surface_set_group().
|
||||
*
|
||||
* Returns: (transfer none): the group leader surface for @surface
|
||||
**/
|
||||
GdkSurface *
|
||||
gdk_surface_get_group (GdkSurface *surface)
|
||||
{
|
||||
return GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->get_group (surface);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_surface_set_group:
|
||||
* @surface: a toplevel #GdkSurface
|
||||
* @leader: (allow-none): group leader surface, or %NULL to restore the default group leader surface
|
||||
*
|
||||
* Sets the group leader surface for @surface. By default,
|
||||
* GDK sets the group leader for all toplevel surfaces
|
||||
* to a global surface implicitly created by GDK. With this function
|
||||
* you can override this default.
|
||||
*
|
||||
* The group leader surface allows the window manager to distinguish
|
||||
* all surfaces that belong to a single application. It may for example
|
||||
* allow users to minimize/unminimize all surfaces belonging to an
|
||||
* application at once. You should only set a non-default group surface
|
||||
* if your application pretends to be multiple applications.
|
||||
**/
|
||||
void
|
||||
gdk_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_group (surface, leader);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_surface_set_decorations:
|
||||
* @surface: a toplevel #GdkSurface
|
||||
|
@ -653,11 +653,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_set_icon_name (GdkSurface *surface,
|
||||
const gchar *name);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkSurface* gdk_surface_get_group (GdkSurface *surface);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_set_decorations (GdkSurface *surface,
|
||||
GdkWMDecoration decorations);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -159,9 +159,6 @@ struct _GdkSurfaceImplClass
|
||||
gboolean setting);
|
||||
void (* set_keep_below) (GdkSurface *surface,
|
||||
gboolean setting);
|
||||
GdkSurface * (* get_group) (GdkSurface *surface);
|
||||
void (* set_group) (GdkSurface *surface,
|
||||
GdkSurface *leader);
|
||||
void (* set_decorations) (GdkSurface *surface,
|
||||
GdkWMDecoration decorations);
|
||||
gboolean (* get_decorations) (GdkSurface *surface,
|
||||
|
@ -2584,27 +2584,6 @@ gdk_quartz_surface_set_keep_below (GdkSurface *window,
|
||||
[impl->toplevel setLevel: level - (setting ? 1 : 0)];
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_quartz_surface_get_group (GdkSurface *window)
|
||||
{
|
||||
g_return_val_if_fail (GDK_SURFACE_TYPE (window) != GDK_SURFACE_CHILD, NULL);
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (window) ||
|
||||
!SURFACE_IS_TOPLEVEL (window))
|
||||
return NULL;
|
||||
|
||||
/* FIXME: Implement */
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_surface_set_group (GdkSurface *window,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_surface_destroy_notify (GdkSurface *window)
|
||||
{
|
||||
@ -2724,8 +2703,6 @@ gdk_surface_impl_quartz_class_init (GdkSurfaceImplQuartzClass *klass)
|
||||
impl_class->unfullscreen = gdk_quartz_surface_unfullscreen;
|
||||
impl_class->set_keep_above = gdk_quartz_surface_set_keep_above;
|
||||
impl_class->set_keep_below = gdk_quartz_surface_set_keep_below;
|
||||
impl_class->get_group = gdk_quartz_surface_get_group;
|
||||
impl_class->set_group = gdk_quartz_surface_set_group;
|
||||
impl_class->set_decorations = gdk_quartz_surface_set_decorations;
|
||||
impl_class->get_decorations = gdk_quartz_surface_get_decorations;
|
||||
impl_class->set_functions = gdk_quartz_surface_set_functions;
|
||||
|
@ -3499,18 +3499,6 @@ gdk_wayland_surface_set_keep_below (GdkSurface *surface,
|
||||
{
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_wayland_surface_get_group (GdkSurface *surface)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_set_decorations (GdkSurface *surface,
|
||||
GdkWMDecoration decorations)
|
||||
@ -3848,8 +3836,6 @@ _gdk_surface_impl_wayland_class_init (GdkSurfaceImplWaylandClass *klass)
|
||||
impl_class->unfullscreen = gdk_wayland_surface_unfullscreen;
|
||||
impl_class->set_keep_above = gdk_wayland_surface_set_keep_above;
|
||||
impl_class->set_keep_below = gdk_wayland_surface_set_keep_below;
|
||||
impl_class->get_group = gdk_wayland_surface_get_group;
|
||||
impl_class->set_group = gdk_wayland_surface_set_group;
|
||||
impl_class->set_decorations = gdk_wayland_surface_set_decorations;
|
||||
impl_class->get_decorations = gdk_wayland_surface_get_decorations;
|
||||
impl_class->set_functions = gdk_wayland_surface_set_functions;
|
||||
|
@ -2066,32 +2066,6 @@ gdk_win32_surface_set_icon_name (GdkSurface *window,
|
||||
#endif
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_win32_surface_get_group (GdkSurface *window)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (window), NULL);
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return NULL;
|
||||
|
||||
g_warning ("gdk_surface_get_group not yet implemented");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_surface_set_group (GdkSurface *window,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
g_return_if_fail (leader == NULL || GDK_IS_SURFACE (leader));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (window) || GDK_SURFACE_DESTROYED (leader))
|
||||
return;
|
||||
|
||||
g_warning ("gdk_surface_set_group not implemented");
|
||||
}
|
||||
|
||||
static void
|
||||
update_single_bit (LONG *style,
|
||||
gboolean all,
|
||||
@ -5268,8 +5242,6 @@ gdk_surface_impl_win32_class_init (GdkSurfaceImplWin32Class *klass)
|
||||
impl_class->unfullscreen = gdk_win32_surface_unfullscreen;
|
||||
impl_class->set_keep_above = gdk_win32_surface_set_keep_above;
|
||||
impl_class->set_keep_below = gdk_win32_surface_set_keep_below;
|
||||
impl_class->get_group = gdk_win32_surface_get_group;
|
||||
impl_class->set_group = gdk_win32_surface_set_group;
|
||||
impl_class->set_decorations = gdk_win32_surface_set_decorations;
|
||||
impl_class->get_decorations = gdk_win32_surface_get_decorations;
|
||||
impl_class->set_functions = gdk_win32_surface_set_functions;
|
||||
|
@ -2110,8 +2110,8 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
x11_drag->protocol = GDK_DRAG_PROTO_XDND;
|
||||
x11_drag->actions = actions;
|
||||
x11_drag->ipc_surface = ipc_surface;
|
||||
if (gdk_surface_get_group (surface))
|
||||
gdk_surface_set_group (x11_drag->ipc_surface, surface);
|
||||
if (gdk_x11_surface_get_group (surface))
|
||||
gdk_x11_surface_set_group (x11_drag->ipc_surface, surface);
|
||||
gdk_surface_show (x11_drag->ipc_surface);
|
||||
|
||||
x11_drag->drag_surface = create_drag_surface (display);
|
||||
|
@ -3363,7 +3363,7 @@ gdk_x11_surface_set_keep_below (GdkSurface *surface, gboolean setting)
|
||||
setting ? GDK_SURFACE_STATE_BELOW : 0);
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
GdkSurface *
|
||||
gdk_x11_surface_get_group (GdkSurface *surface)
|
||||
{
|
||||
GdkToplevelX11 *toplevel;
|
||||
@ -3377,7 +3377,7 @@ gdk_x11_surface_get_group (GdkSurface *surface)
|
||||
return toplevel->group_leader;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
gdk_x11_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader)
|
||||
{
|
||||
@ -4679,8 +4679,6 @@ gdk_surface_impl_x11_class_init (GdkSurfaceImplX11Class *klass)
|
||||
impl_class->unfullscreen = gdk_x11_surface_unfullscreen;
|
||||
impl_class->set_keep_above = gdk_x11_surface_set_keep_above;
|
||||
impl_class->set_keep_below = gdk_x11_surface_set_keep_below;
|
||||
impl_class->get_group = gdk_x11_surface_get_group;
|
||||
impl_class->set_group = gdk_x11_surface_set_group;
|
||||
impl_class->set_decorations = gdk_x11_surface_set_decorations;
|
||||
impl_class->get_decorations = gdk_x11_surface_get_decorations;
|
||||
impl_class->set_functions = gdk_x11_surface_set_functions;
|
||||
|
@ -115,6 +115,13 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gdk_x11_surface_set_urgency_hint (GdkSurface *surface,
|
||||
gboolean urgent);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_x11_surface_set_group (GdkSurface *surface,
|
||||
GdkSurface *leader);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkSurface * gdk_x11_surface_get_group (GdkSurface *surface);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_X11_SURFACE_H__ */
|
||||
|
@ -3,7 +3,6 @@
|
||||
<object class="GtkMessageDialog" id="messagedialog1">
|
||||
<property name="type">popup</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="skip_taskbar_hint">1</property>
|
||||
<property name="buttons">ok</property>
|
||||
<property name="text" translatable="yes">Text</property>
|
||||
<property name="secondary_text" translatable="yes">Secondary text #5</property>
|
||||
|
@ -3,7 +3,6 @@
|
||||
<object class="GtkMessageDialog" id="messagedialog1">
|
||||
<property name="type">popup</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="skip_taskbar_hint">1</property>
|
||||
<property name="buttons">ok</property>
|
||||
<property name="text" translatable="yes">Text</property>
|
||||
<property name="secondary_text" translatable="yes">Secondary text #1</property>
|
||||
|
Loading…
Reference in New Issue
Block a user