[gtk/custom-surface] Drop gdk_wayland_surface_set_use_custom_surface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/custom-surface] Drop gdk_wayland_surface_set_use_custom_surface
- Date: Wed, 3 Apr 2019 23:24:44 +0000 (UTC)
commit 624c30ecd2b7d477db32d0b7e7b1a1607532851e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Apr 3 23:22:36 2019 +0000
Drop gdk_wayland_surface_set_use_custom_surface
This is unused in GTK, and it does not seem useful
enough to keep around.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1806
docs/reference/gdk/gdk4-sections.txt | 1 -
gdk/wayland/gdksurface-wayland.c | 60 +-----------------------------------
gdk/wayland/gdkwaylandsurface.h | 3 --
3 files changed, 1 insertion(+), 63 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index b7bbd6891e..fb68d5aec0 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -997,7 +997,6 @@ gdk_wayland_display_get_wl_display
gdk_wayland_display_query_registry
gdk_wayland_surface_new_subsurface
gdk_wayland_surface_get_wl_surface
-gdk_wayland_surface_set_use_custom_surface
GdkWaylandSurfaceExported
gdk_wayland_surface_export_handle
gdk_wayland_surface_unexport_handle
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index bc496362b9..9e774c31b4 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -128,7 +128,6 @@ struct _GdkSurfaceImplWayland
unsigned int initial_configure_received : 1;
unsigned int mapped : 1;
- unsigned int use_custom_surface : 1;
unsigned int pending_commit : 1;
unsigned int awaiting_frame : 1;
GdkSurfaceTypeHint hint;
@@ -2413,7 +2412,7 @@ gdk_wayland_surface_map (GdkSurface *surface)
if (!should_be_mapped (surface))
return;
- if (impl->mapped || impl->use_custom_surface)
+ if (impl->mapped)
return;
if (should_map_as_popup (surface))
@@ -4010,63 +4009,6 @@ gdk_wayland_surface_get_gtk_surface (GdkSurface *surface)
return GDK_SURFACE_IMPL_WAYLAND (surface->impl)->display_server.gtk_surface;
}
-/**
- * gdk_wayland_surface_set_use_custom_surface:
- * @surface: (type GdkWaylandSurface): a #GdkSurface
- *
- * Marks a #GdkSurface as a custom Wayland surface. The application is
- * expected to register the surface as some type of surface using
- * some Wayland interface.
- *
- * A good example would be writing a panel or on-screen-keyboard as an
- * out-of-process helper - as opposed to having those in the compositor
- * process. In this case the underlying surface isn’t an xdg_shell
- * surface and the panel or OSK client need to identify the wl_surface
- * as a panel or OSK to the compositor. The assumption is that the
- * compositor will expose a private interface to the special client
- * that lets the client identify the wl_surface as a panel or such.
- *
- * This function should be called before a #GdkSurface is shown. This is
- * best done by connecting to the #GtkWidget::realize signal:
- *
- * |[<!-- language="C" -->
- * static void
- * widget_realize_cb (GtkWidget *widget)
- * {
- * GdkSurface *surface;
- * struct wl_surface *surface;
- * struct input_panel_surface *ip_surface;
- *
- * surface = gtk_widget_get_surface (widget);
- * gdk_wayland_surface_set_custom_surface (surface);
- *
- * surface = gdk_wayland_surface_get_wl_surface (surface);
- * ip_surface = input_panel_get_input_panel_surface (input_panel, surface);
- * input_panel_surface_set_panel (ip_surface);
- * }
- *
- * static void
- * setup_window (GtkWindow *window)
- * {
- * g_signal_connect (window, "realize", G_CALLBACK (widget_realize_cb), NULL);
- * }
- * ]|
- */
-void
-gdk_wayland_surface_set_use_custom_surface (GdkSurface *surface)
-{
- GdkSurfaceImplWayland *impl;
-
- g_return_if_fail (GDK_IS_WAYLAND_SURFACE (surface));
-
- impl = GDK_SURFACE_IMPL_WAYLAND (surface->impl);
-
- if (!impl->display_server.wl_surface)
- gdk_wayland_surface_create_surface (surface);
-
- impl->use_custom_surface = TRUE;
-}
-
static void
maybe_set_gtk_surface_dbus_properties (GdkSurface *surface)
{
diff --git a/gdk/wayland/gdkwaylandsurface.h b/gdk/wayland/gdkwaylandsurface.h
index f407e9921f..d236007900 100644
--- a/gdk/wayland/gdkwaylandsurface.h
+++ b/gdk/wayland/gdkwaylandsurface.h
@@ -51,9 +51,6 @@ GdkSurface * gdk_wayland_surface_new_subsurface (GdkDisplay
GDK_AVAILABLE_IN_ALL
struct wl_surface *gdk_wayland_surface_get_wl_surface (GdkSurface *surface);
-GDK_AVAILABLE_IN_ALL
-void gdk_wayland_surface_set_use_custom_surface (GdkSurface *surface);
-
GDK_AVAILABLE_IN_ALL
void gdk_wayland_surface_set_dbus_properties_libgtk_only (GdkSurface *surface,
const char *application_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]