diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-04-21 12:24:07 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-28 20:25:14 +0000 |
commit | 47fb0923930b67dc6062f70612345ef3a3d8c19b (patch) | |
tree | 667eed05d76ab7aac3b3b5e5e5338518dd1eb98f | |
parent | 2855729cb441c854c8493baf714d8e7b385f2a63 (diff) | |
download | gtk+-47fb0923930b67dc6062f70612345ef3a3d8c19b.tar.gz |
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.
-rw-r--r-- | gdk/broadway/gdkprivate-broadway.h | 3 | ||||
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 3 | ||||
-rw-r--r-- | gdk/gdkdisplay.c | 6 | ||||
-rw-r--r-- | gdk/gdkdisplayprivate.h | 6 | ||||
-rw-r--r-- | gdk/gdkinternals.h | 10 | ||||
-rw-r--r-- | gdk/gdksurface.c | 10 | ||||
-rw-r--r-- | gdk/quartz/gdksurface-quartz.c | 3 | ||||
-rw-r--r-- | gdk/wayland/gdkprivate-wayland.h | 3 | ||||
-rw-r--r-- | gdk/wayland/gdksurface-wayland.c | 3 | ||||
-rw-r--r-- | gdk/win32/gdksurface-win32.c | 13 | ||||
-rw-r--r-- | gdk/x11/gdkprivate-x11.h | 3 | ||||
-rw-r--r-- | 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 ba798084fe..980f4090a0 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -217,8 +217,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 4f3d3cfb1c..fd23582988 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 d96d214524..74ad7af756 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -483,7 +483,6 @@ gdk_surface_new (GdkDisplay *display, { GdkSurface *surface; GdkFrameClock *frame_clock; - GdkSurfaceAttr attributes; surface = _gdk_display_create_surface (display); @@ -491,22 +490,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 55609fde28..d8f6e24fcd 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -545,8 +545,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 57af9d9b95..713afc034f 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -520,18 +520,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; @@ -550,9 +544,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 658a2d9b5a..345439fb8c 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -178,8 +178,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 9bb117ded5..802d42dfab 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; |