[gtk/present-toplevel-2: 98/178] implement new toplevel api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel-2: 98/178] implement new toplevel api
- Date: Tue, 10 Mar 2020 01:18:10 +0000 (UTC)
commit aa5f6b9d4bef03d8ef940efebb545f090fc7c2ae
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 3 10:05:26 2020 -0800
implement new toplevel api
gdk/gdksurface.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 8e2f0de109..f187068df7 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2097,6 +2097,17 @@ gdk_toplevel_surface_minimize (GdkToplevel *toplevel)
return TRUE;
}
+static void
+gdk_toplevel_surface_focus (GdkToplevel *toplevel,
+ guint32 timestamp)
+{
+ GdkSurface *surface = GDK_SURFACE (toplevel);
+
+ g_return_if_fail (surface->surface_type == GDK_SURFACE_TOPLEVEL);
+
+ GDK_SURFACE_GET_CLASS (surface)->focus (surface, timestamp);
+}
+
static gboolean
gdk_toplevel_surface_show_window_menu (GdkToplevel *toplevel,
GdkEvent *event)
@@ -2113,6 +2124,7 @@ gdk_surface_toplevel_init (GdkToplevelInterface *iface)
{
iface->present = gdk_toplevel_surface_present;
iface->minimize = gdk_toplevel_surface_minimize;
+ iface->focus = gdk_toplevel_surface_focus;
iface->show_window_menu = gdk_toplevel_surface_show_window_menu;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]