[gtk: 1/2] gdk: Make gdk_surface_move_to_rect public



commit c0e1044d5c11ec810b81bad91affb23576364ca8
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Jun 5 17:46:34 2018 +0200

    gdk: Make gdk_surface_move_to_rect public
    
    This is the API used by GtkMenu to properly position menus on the screen
    without requiring GTK to query the menu window's position or the work
    area of where the window is positioned. It makes it possible to position
    popup windows properly when using Wayland.
    
    Make this API available to external users so custom popup windows can be
    positioned properly as well.
    
    Related: https://gitlab.gnome.org/GNOME/gtk/issues/997

 gdk/gdk-private.h | 8 --------
 gdk/gdksurface.c  | 2 --
 gdk/gdksurface.h  | 9 +++++++++
 3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/gdk/gdk-private.h b/gdk/gdk-private.h
index 0618f8187f..2d96acc2da 100644
--- a/gdk/gdk-private.h
+++ b/gdk/gdk-private.h
@@ -20,14 +20,6 @@ void            gdk_surface_thaw_toplevel_updates        (GdkSurface *surface);
 
 gboolean        gdk_surface_supports_edge_constraints    (GdkSurface *surface);
 
-void            gdk_surface_move_to_rect        (GdkSurface          *surface,
-                                                 const GdkRectangle *rect,
-                                                 GdkGravity          rect_anchor,
-                                                 GdkGravity          surface_anchor,
-                                                 GdkAnchorHints      anchor_hints,
-                                                 gint                rect_anchor_dx,
-                                                 gint                rect_anchor_dy);
-
 GObject *       gdk_event_get_user_data         (const GdkEvent *event);
 
 guint32         gdk_display_get_last_seen_time  (GdkDisplay *display);
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index aac5af5ea4..323e5069f9 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -3055,8 +3055,6 @@ gdk_surface_move_resize (GdkSurface *surface,
  *
  * Connect to the #GdkSurface::moved-to-rect signal to find out how it was
  * actually positioned.
- *
- * Stability: Private
  */
 void
 gdk_surface_move_to_rect (GdkSurface          *surface,
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index ddae4f2128..5158e11761 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -486,6 +486,15 @@ void          gdk_surface_move_resize           (GdkSurface     *surface,
                                                  gint           width,
                                                  gint           height);
 GDK_AVAILABLE_IN_ALL
+void          gdk_surface_move_to_rect          (GdkSurface         *surface,
+                                                 const GdkRectangle *rect,
+                                                 GdkGravity          rect_anchor,
+                                                 GdkGravity          surface_anchor,
+                                                 GdkAnchorHints      anchor_hints,
+                                                 gint                rect_anchor_dx,
+                                                 gint                rect_anchor_dy);
+
+GDK_AVAILABLE_IN_ALL
 void          gdk_surface_raise                 (GdkSurface     *surface);
 GDK_AVAILABLE_IN_ALL
 void          gdk_surface_lower                 (GdkSurface     *surface);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]