[gtk/present-toplevel-2: 62/83] x11: Stop using surface-type



commit 4423d499fd0245710a5e02434ea21cbb0a0f3aae
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 9 08:00:51 2020 -0700

    x11: Stop using surface-type

 gdk/x11/gdksurface-x11.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index d35998772d..ae63858170 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -850,14 +850,12 @@ _gdk_x11_display_create_surface (GdkDisplay     *display,
     {
     case GDK_SURFACE_TOPLEVEL:
       surface = g_object_new (GDK_TYPE_X11_TOPLEVEL,
-                              "surface-type", surface_type,
                               "display", display,
                               "frame-clock", frame_clock,
                               NULL);
       break;
     case GDK_SURFACE_POPUP:
       surface = g_object_new (GDK_TYPE_X11_POPUP,
-                              "surface-type", surface_type,
                               "parent", parent,
                               "display", display,
                               "frame-clock", frame_clock,
@@ -865,7 +863,6 @@ _gdk_x11_display_create_surface (GdkDisplay     *display,
       break;
     case GDK_SURFACE_TEMP:
       surface = g_object_new (GDK_TYPE_X11_DRAG_SURFACE,
-                              "surface-type", surface_type,
                               "display", display,
                               "frame-clock", frame_clock,
                               NULL);
@@ -907,8 +904,8 @@ _gdk_x11_display_create_surface (GdkDisplay     *display,
   xattributes.colormap = gdk_x11_display_get_window_colormap (display_x11);
   xattributes_mask |= CWColormap;
 
-  if (surface->surface_type == GDK_SURFACE_TEMP ||
-      surface->surface_type == GDK_SURFACE_POPUP)
+  if (surface_type == GDK_SURFACE_TEMP ||
+      surface_type == GDK_SURFACE_POPUP)
     {
       xattributes.save_under = True;
       xattributes.override_redirect = True;
@@ -948,9 +945,9 @@ _gdk_x11_display_create_surface (GdkDisplay     *display,
   _gdk_x11_display_add_window (x11_screen->display, &impl->xid, surface);
 
   gdk_x11_surface_set_title (surface, get_default_title ());
-  if (surface->surface_type == GDK_SURFACE_TOPLEVEL)
+  if (surface_type == GDK_SURFACE_TOPLEVEL)
     gdk_x11_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_NORMAL);
-  else if (surface->surface_type == GDK_SURFACE_POPUP)
+  else if (surface_type == GDK_SURFACE_POPUP)
     gdk_x11_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_MENU);
 
   class_hint = XAllocClassHint ();


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