[mutter/wayland] window: Remove width/height from meta_window_new_for_wayland



commit d945501be6cee1d1abaedd3ecff627d624e68a9c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Nov 19 15:32:33 2013 -0500

    window: Remove width/height from meta_window_new_for_wayland

 src/core/window-private.h          |    2 --
 src/core/window.c                  |    6 ++----
 src/wayland/meta-wayland-surface.c |    6 +-----
 3 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index cc2faa4..82d68fd 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -508,8 +508,6 @@ MetaWindow* meta_window_new_with_attrs     (MetaDisplay       *display,
                                             MetaCompEffect     effect,
                                             XWindowAttributes *attrs);
 MetaWindow *meta_window_new_for_wayland    (MetaDisplay        *display,
-                                            int                 width,
-                                            int                 height,
                                             MetaWaylandSurface *surface);
 void        meta_window_unmanage           (MetaWindow  *window,
                                             guint32      timestamp);
diff --git a/src/core/window.c b/src/core/window.c
index e501321..6d0c295 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1369,8 +1369,6 @@ display_notify_window (MetaDisplay *display, MetaWindow *window)
 
 MetaWindow *
 meta_window_new_for_wayland (MetaDisplay        *display,
-                             int                 width,
-                             int                 height,
                              MetaWaylandSurface *surface)
 {
   XWindowAttributes attrs;
@@ -1379,8 +1377,8 @@ meta_window_new_for_wayland (MetaDisplay        *display,
 
   attrs.x = 0;
   attrs.y = 0;
-  attrs.width = width;
-  attrs.height = height;
+  attrs.width = 1;
+  attrs.height = 1;
   attrs.border_width = 0;
   attrs.depth = 24;
   attrs.visual = NULL;
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 1df8981..226a2af 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -246,7 +246,6 @@ static void
 surface_ensure_window (MetaWaylandSurface *surface)
 {
   MetaDisplay *display = meta_get_display ();
-  int width, height;
 
   if (surface->window)
     return;
@@ -254,10 +253,7 @@ surface_ensure_window (MetaWaylandSurface *surface)
   if (!surface_wants_window (surface))
     return;
 
-  width = surface->buffer_ref.buffer->width;
-  height = surface->buffer_ref.buffer->height;
-
-  surface->window = meta_window_new_for_wayland (display, width, height, surface);
+  surface->window = meta_window_new_for_wayland (display, surface);
 }
 
 static void


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