[gtk/present-toplevel-2: 9/71] x11: Stop using gdk_surface_raise
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel-2: 9/71] x11: Stop using gdk_surface_raise
- Date: Thu, 5 Mar 2020 02:27:20 +0000 (UTC)
commit f07ac371352658a037998f35f71cf746aecc55e6
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 29 12:54:24 2020 -0500
x11: Stop using gdk_surface_raise
Avoid a vfunc roundtrip and just use the backend
implementation directly.
gdk/x11/gdkdrag-x11.c | 2 +-
gdk/x11/gdkprivate-x11.h | 2 ++
gdk/x11/gdksurface-x11.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index cbf5b75d06..8ac9bd782b 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -1399,7 +1399,7 @@ move_drag_surface (GdkDrag *drag,
gdk_x11_surface_move (drag_x11->drag_surface,
x_root - drag_x11->hot_x,
y_root - drag_x11->hot_y);
- gdk_surface_raise (drag_x11->drag_surface);
+ gdk_x11_surface_raise (drag_x11->drag_surface);
}
static gboolean
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 36cdea1d1c..d1b5e4c3e3 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -230,6 +230,8 @@ void gdk_x11_surface_get_root_coords (GdkSurface *surface,
gint *root_x,
gint *root_y);
+void gdk_x11_surface_raise (GdkSurface *surface);
+
GdkGrabStatus _gdk_x11_convert_grab_status (gint status);
cairo_surface_t * _gdk_x11_display_create_bitmap_surface (GdkDisplay *display,
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 4a5c52f19c..66ca48a360 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -1455,7 +1455,7 @@ gdk_x11_surface_layout_popup (GdkSurface *surface,
static void
show_popup (GdkSurface *surface)
{
- gdk_surface_raise (surface);
+ gdk_x11_surface_raise (surface);
gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
_gdk_surface_update_viewable (surface);
gdk_x11_surface_show (surface, FALSE);
@@ -1561,7 +1561,7 @@ _gdk_x11_surface_set_surface_scale (GdkSurface *surface,
gdk_surface_invalidate_rect (surface, NULL);
}
-static void
+void
gdk_x11_surface_raise (GdkSurface *surface)
{
XRaiseWindow (GDK_SURFACE_XDISPLAY (surface), GDK_SURFACE_XID (surface));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]