[gtk/surface-get-mapped: 2/3] Replace gdk_surface_is_visible by _get_mapped



commit 7a39f2d49d67f29ec0a067a1e535c6323d081414
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 24 19:02:34 2020 -0500

    Replace gdk_surface_is_visible by _get_mapped
    
    The property  is called ::mapped, and we want to get
    to standard getter naming.

 gdk/gdkseatdefault.c             | 6 +++---
 gdk/wayland/gdkdevice-wayland.c  | 4 ++--
 gdk/wayland/gdksurface-wayland.c | 2 +-
 gdk/x11/gdkdrag-x11.c            | 2 +-
 gtk/gtkpopover.c                 | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c
index 5b1a8425e8..26bf5ae967 100644
--- a/gdk/gdkseatdefault.c
+++ b/gdk/gdkseatdefault.c
@@ -119,14 +119,14 @@ gdk_seat_default_grab (GdkSeat                *seat,
   gboolean was_visible;
 
   priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
-  was_visible = gdk_surface_is_visible (surface);
+  was_visible = gdk_surface_get_mapped (surface);
 
   if (prepare_func)
     (prepare_func) (seat, surface, prepare_func_data);
 
-  if (!gdk_surface_is_visible (surface))
+  if (!gdk_surface_get_mapped (surface))
     {
-      g_critical ("Surface %p has not been made visible in GdkSeatGrabPrepareFunc",
+      g_critical ("Surface %p has not been mapped in GdkSeatGrabPrepareFunc",
                   surface);
       return GDK_GRAB_NOT_VIEWABLE;
     }
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index c18b0e1eaf..09fa321d16 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -750,7 +750,7 @@ gdk_wayland_device_grab (GdkDevice    *device,
   GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer;
 
   if (gdk_surface_get_surface_type (surface) == GDK_SURFACE_TEMP &&
-      gdk_surface_is_visible (surface))
+      gdk_surface_get_mapped (surface))
     {
       g_warning ("Surface %p is already mapped at the time of grabbing. "
                  "gdk_seat_grab() should be used to simultanously grab input "
@@ -4502,7 +4502,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
   if (prepare_func)
     (prepare_func) (seat, surface, prepare_func_data);
 
-  if (!gdk_surface_is_visible (surface))
+  if (!gdk_surface_get_mapped (surface))
     {
       gdk_wayland_seat_set_grab_surface (wayland_seat, NULL);
       return GDK_GRAB_NOT_VIEWABLE;
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 6b59f43c9e..e50c39991a 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -864,7 +864,7 @@ gdk_wayland_surface_maybe_resize (GdkSurface *surface,
    */
 
   is_xdg_popup = is_realized_popup (surface);
-  is_visible = gdk_surface_is_visible (surface);
+  is_visible = gdk_surface_get_mapped (surface);
 
   if (is_xdg_popup && is_visible && !impl->initial_configure_received)
     gdk_wayland_surface_hide (surface);
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index b946cb255f..c4fed39c84 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -543,7 +543,7 @@ gdk_surface_cache_new (GdkDisplay *display)
                                 x * impl->surface_scale, y * impl->surface_scale, 
                                width * impl->surface_scale, 
                                height * impl->surface_scale,
-                                gdk_surface_is_visible (surface));
+                                gdk_surface_get_mapped (surface));
         }
       return result;
     }
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 286388bb2d..d36159cde1 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -826,7 +826,7 @@ surface_transform_changed_cb (GtkWidget               *widget,
   GtkPopover *popover = user_data;
   GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
 
-  if (priv->surface && gdk_surface_is_visible (priv->surface))
+  if (priv->surface && gdk_surface_get_mapped (priv->surface))
     present_popup (popover);
 
   return G_SOURCE_CONTINUE;
@@ -1567,7 +1567,7 @@ relative_to_size_changed (GtkWidget  *widget,
 {
   GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
 
-  if (priv->surface && gdk_surface_is_visible (priv->surface))
+  if (priv->surface && gdk_surface_get_mapped (priv->surface))
     present_popup (popover);
 }
 


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