[gtk/wip/matthiasc/popup4: 53/94] gdk: Drop GdkWindowAttr



commit 7d7bd185419146026d7c0e424e44e27f39b64365
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 21 12:24:07 2019 -0400

    gdk: Drop GdkWindowAttr
    
    All the information in it is already contained
    in the surface object we pass along, and none
    of the backend implementations were using the
    attributes at all.

 gdk/broadway/gdkprivate-broadway.h |  3 +--
 gdk/broadway/gdksurface-broadway.c |  3 +--
 gdk/gdkdisplay.c                   |  6 ++----
 gdk/gdkdisplayprivate.h            |  6 ++----
 gdk/gdkinternals.h                 | 10 ----------
 gdk/gdksurface.c                   | 10 ++--------
 gdk/quartz/gdksurface-quartz.c     |  3 +--
 gdk/wayland/gdkprivate-wayland.h   |  3 +--
 gdk/wayland/gdksurface-wayland.c   |  3 +--
 gdk/win32/gdksurface-win32.c       | 13 +++----------
 gdk/x11/gdkprivate-x11.h           |  3 +--
 gdk/x11/gdksurface-x11.c           |  3 +--
 12 files changed, 16 insertions(+), 50 deletions(-)
---
diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h
index 6f9e126dff..5987c2c454 100644
--- a/gdk/broadway/gdkprivate-broadway.h
+++ b/gdk/broadway/gdkprivate-broadway.h
@@ -103,8 +103,7 @@ void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
                                                     guint       *height);
 void       _gdk_broadway_display_create_surface_impl    (GdkDisplay    *display,
                                                          GdkSurface     *surface,
-                                                         GdkSurface     *real_parent,
-                                                         GdkSurfaceAttr *attributes);
+                                                         GdkSurface     *real_parent);
 gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay    *display,
                                                        GdkAtom        encoding,
                                                        gint           format,
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index b788e78896..613e6cd7c1 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -214,8 +214,7 @@ connect_frame_clock (GdkSurface *surface)
 void
 _gdk_broadway_display_create_surface_impl (GdkDisplay     *display,
                                            GdkSurface     *surface,
-                                           GdkSurface     *real_parent,
-                                           GdkSurfaceAttr *attributes)
+                                           GdkSurface     *real_parent)
 {
   GdkSurfaceImplBroadway *impl;
   GdkBroadwayDisplay *broadway_display;
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 3e7cb2c847..1290b78d55 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1327,13 +1327,11 @@ _gdk_display_event_data_free (GdkDisplay *display,
 void
 gdk_display_create_surface_impl (GdkDisplay       *display,
                                  GdkSurface       *surface,
-                                 GdkSurface       *real_parent,
-                                 GdkSurfaceAttr   *attributes)
+                                 GdkSurface       *real_parent)
 {
   GDK_DISPLAY_GET_CLASS (display)->create_surface_impl (display,
                                                         surface,
-                                                        real_parent,
-                                                        attributes);
+                                                        real_parent);
 }
 
 GdkSurface *
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 8a16a28f42..496d023614 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -143,8 +143,7 @@ struct _GdkDisplayClass
                                                  GdkEvent       *event);
   void                       (*create_surface_impl) (GdkDisplay    *display,
                                                      GdkSurface     *surface,
-                                                     GdkSurface     *real_parent,
-                                                     GdkSurfaceAttr *attributes);
+                                                     GdkSurface     *real_parent);
 
   GdkKeymap *                (*get_keymap)         (GdkDisplay    *display);
 
@@ -231,8 +230,7 @@ void                _gdk_display_event_data_free      (GdkDisplay       *display
                                                        GdkEvent         *event);
 void                gdk_display_create_surface_impl   (GdkDisplay       *display,
                                                        GdkSurface        *surface,
-                                                       GdkSurface        *real_parent,
-                                                       GdkSurfaceAttr    *attributes);
+                                                       GdkSurface        *real_parent);
 GdkSurface *         _gdk_display_create_surface      (GdkDisplay       *display);
 
 gboolean            gdk_display_make_gl_context_current  (GdkDisplay        *display,
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 61e0fd2cf9..6e334224ab 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -42,8 +42,6 @@ G_BEGIN_DECLS
 
 /* Debugging support */
 
-typedef struct _GdkSurfaceAttr          GdkSurfaceAttr;
-
 typedef enum {
   GDK_DEBUG_MISC            = 1 <<  0,
   GDK_DEBUG_EVENTS          = 1 <<  1,
@@ -118,14 +116,6 @@ typedef enum
 
 typedef struct _GdkSurfacePaint GdkSurfacePaint;
 
-struct _GdkSurfaceAttr
-{
-  gint x, y;
-  gint width;
-  gint height;
-  GdkSurfaceType surface_type;
-};
-
 struct _GdkSurface
 {
   GObject parent_instance;
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 98bc6ab3a6..9c02a610bd 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -461,7 +461,6 @@ gdk_surface_new (GdkDisplay     *display,
 {
   GdkSurface *surface;
   GdkFrameClock *frame_clock;
-  GdkSurfaceAttr attributes;
 
   surface = _gdk_display_create_surface (display);
 
@@ -469,22 +468,17 @@ gdk_surface_new (GdkDisplay     *display,
   surface->focus_on_map = TRUE;
   surface->alpha = 255;
 
+  surface->surface_type = surface_type;
   surface->x = x;
   surface->y = y;
   surface->width = width;
   surface->height = height;
-  surface->surface_type = surface_type;
 
   frame_clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
   gdk_surface_set_frame_clock (surface, frame_clock);
   g_object_unref (frame_clock);
 
-  attributes.surface_type = surface_type;
-  attributes.x = x;
-  attributes.y = y;
-  attributes.width = width;
-  attributes.height = height;
-  gdk_display_create_surface_impl (display, surface, NULL, &attributes);
+  gdk_display_create_surface_impl (display, surface, NULL);
   surface->impl_surface = surface;
 
   g_signal_connect (display, "seat-removed", G_CALLBACK (seat_removed_cb), surface);
diff --git a/gdk/quartz/gdksurface-quartz.c b/gdk/quartz/gdksurface-quartz.c
index 78b8d0cf5b..cf0cd15dd9 100644
--- a/gdk/quartz/gdksurface-quartz.c
+++ b/gdk/quartz/gdksurface-quartz.c
@@ -734,8 +734,7 @@ get_nsscreen_for_point (gint x, gint y)
 void
 _gdk_quartz_display_create_surface_impl (GdkDisplay    *display,
                                         GdkSurface     *window,
-                                        GdkSurface     *real_parent,
-                                        GdkSurfaceAttr *attributes)
+                                        GdkSurface     *real_parent)
 {
   GdkSurfaceImplQuartz *impl;
   GdkSurfaceImplQuartz *parent_impl;
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 3cbe203ab0..ff4abf2146 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -118,8 +118,7 @@ void             gdk_wayland_drop_set_action               (GdkDrop
 
 void _gdk_wayland_display_create_surface_impl (GdkDisplay     *display,
                                                GdkSurface     *surface,
-                                               GdkSurface     *real_parent,
-                                               GdkSurfaceAttr *attributes);
+                                               GdkSurface     *real_parent);
 
 gint        _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay    *display,
                                                              GdkAtom        encoding,
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 33cd452650..22977dae5b 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -542,8 +542,7 @@ static void gdk_wayland_surface_create_surface (GdkSurface *surface);
 void
 _gdk_wayland_display_create_surface_impl (GdkDisplay     *display,
                                           GdkSurface     *surface,
-                                          GdkSurface     *real_parent,
-                                          GdkSurfaceAttr *attributes)
+                                          GdkSurface     *real_parent)
 {
   GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
   GdkSurfaceImplWayland *impl;
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 7044b4347c..9b62a34f38 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -521,18 +521,12 @@ RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
  * except for toplevel window where OS/Window Manager placement
  * is used.
  *
- * From attributes the only things used is: colormap, title,
- * wmclass and type_hint. [1]. We are checking redundant information
- * and complain if that changes, which would break this implementation
- * again.
- *
  * [1] http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
  */
 void
 _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
                                       GdkSurface     *window,
-                                      GdkSurface     *real_parent,
-                                      GdkSurfaceAttr *attributes)
+                                      GdkSurface     *real_parent)
 {
   HWND hwndNew;
   HANDLE hparent;
@@ -551,9 +545,8 @@ _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
   g_return_if_fail (display == _gdk_display);
 
   GDK_NOTE (MISC,
-            g_print ("_gdk_surface_impl_new: %s %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? 
"TOPLEVEL" :
-                                                       (window->surface_type == GDK_SURFACE_TEMP ? "TEMP" : 
"???")),
-                                                       (attributes->wclass == GDK_INPUT_OUTPUT ? "" : 
"input-only")));
+            g_print ("_gdk_surface_impl_new: %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? 
"TOPLEVEL" :
+                                                       (window->surface_type == GDK_SURFACE_TEMP ? "TEMP" : 
"???")));
 
   hparent = (real_parent != NULL) ? GDK_SURFACE_HWND (real_parent) : NULL;
 
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 813fa81e1c..abb32a9fc8 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -182,8 +182,7 @@ void       _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
                                                      guint      *height);
 void       _gdk_x11_display_create_surface_impl     (GdkDisplay    *display,
                                                      GdkSurface     *window,
-                                                     GdkSurface     *real_parent,
-                                                     GdkSurfaceAttr *attributes);
+                                                     GdkSurface     *real_parent);
 GList *    gdk_x11_display_get_toplevel_windows     (GdkDisplay *display);
 
 void _gdk_x11_precache_atoms (GdkDisplay          *display,
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index f9892b9957..c5ca8a16f9 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -814,8 +814,7 @@ connect_frame_clock (GdkSurface *surface)
 void
 _gdk_x11_display_create_surface_impl (GdkDisplay    *display,
                                       GdkSurface     *surface,
-                                      GdkSurface     *real_parent,
-                                      GdkSurfaceAttr *attributes)
+                                      GdkSurface     *real_parent)
 {
   GdkSurfaceImplX11 *impl;
   GdkX11Screen *x11_screen;


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