[gtk/present-toplevel: 49/54] surface: Use toplevel functions and decorations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel: 49/54] surface: Use toplevel functions and decorations
- Date: Sun, 1 Mar 2020 19:37:49 +0000 (UTC)
commit 423d4f4a8a9e5ef94606be6107d671b68f596dbc
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 1 11:20:21 2020 -0800
surface: Use toplevel functions and decorations
gdk/gdksurface.c | 31 ++-----------------------------
gdk/gdksurface.h | 3 ---
2 files changed, 2 insertions(+), 32 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index f32b2e7749..f80babbe1e 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2041,6 +2041,8 @@ gdk_toplevel_surface_present (GdkToplevel *toplevel,
GDK_SURFACE_GET_CLASS (surface)->set_modal_hint (surface, gdk_toplevel_layout_get_modal (layout));
GDK_SURFACE_GET_CLASS (surface)->set_type_hint (surface, gdk_toplevel_layout_get_type_hint (layout));
+ GDK_SURFACE_GET_CLASS (surface)->set_decorations (surface, gdk_toplevel_layout_get_decorations (layout));
+ GDK_SURFACE_GET_CLASS (surface)->set_functions (surface, gdk_toplevel_layout_get_functions (layout));
if (gdk_toplevel_layout_get_raise (layout))
{
@@ -3328,35 +3330,6 @@ gdk_surface_set_shadow_width (GdkSurface *surface,
class->set_shadow_width (surface, left, right, top, bottom);
}
-/**
- * gdk_surface_show_window_menu:
- * @surface: a #GdkSurface
- * @event: a #GdkEvent to show the menu for
- *
- * Asks the windowing system to show the window menu. The window menu
- * is the menu shown when right-clicking the titlebar on traditional
- * windows managed by the window manager. This is useful for windows
- * using client-side decorations, activating it with a right-click
- * on the window decorations.
- *
- * Returns: %TRUE if the window menu was shown and %FALSE otherwise.
- */
-gboolean
-gdk_surface_show_window_menu (GdkSurface *surface,
- GdkEvent *event)
-{
- GdkSurfaceClass *class;
-
- g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
- g_return_val_if_fail (!GDK_SURFACE_DESTROYED (surface), FALSE);
-
- class = GDK_SURFACE_GET_CLASS (surface);
- if (class->show_window_menu)
- return class->show_window_menu (surface, event);
- else
- return FALSE;
-}
-
gboolean
gdk_surface_supports_edge_constraints (GdkSurface *surface)
{
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index ac139c7620..db204e9922 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -493,9 +493,6 @@ void gdk_surface_set_shadow_width (GdkSurface *surface,
gint right,
gint top,
gint bottom);
-GDK_AVAILABLE_IN_ALL
-gboolean gdk_surface_show_window_menu (GdkSurface *surface,
- GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkCairoContext *gdk_surface_create_cairo_context(GdkSurface *surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]