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

weston: Changes to 'debian-experimental'



 clients/weston-simple-im.c       |    6 +-
 configure.ac                     |    6 +-
 debian/changelog                 |    7 +++
 debian/weston.install            |    6 --
 desktop-shell/shell.c            |   79 +++++++++++++++++++++++++--------------
 libweston-desktop/xdg-shell-v5.c |   42 +++++++++++++++-----
 libweston-desktop/xdg-shell-v6.c |   45 ++++++++++++++++++++--
 libweston-desktop/xwayland.c     |    6 --
 libweston/compositor-drm.c       |    2 
 libweston/compositor-wayland.c   |    2 
 libweston/compositor.h           |    7 ---
 releasing.txt                    |    4 -
 shared/config-parser.c           |    1 
 13 files changed, 146 insertions(+), 67 deletions(-)

New commits:
commit ccffd465b7a20bfa0888c27b3637cdb491a68422
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Wed Sep 14 12:49:30 2016 +0200

    Release to experimental

diff --git a/debian/changelog b/debian/changelog
index a64ecea..964c499 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-weston (1.11.94-1) UNRELEASED; urgency=medium
+weston (1.11.94-1) experimental; urgency=medium
 
   * New upstream release.
   * debian/weston.install: use wildcards for libweston{,-desktop}.so.*.
 
- -- Emilio Pozuelo Monfort <pochu@debian.org>  Wed, 14 Sep 2016 12:14:59 +0200
+ -- Emilio Pozuelo Monfort <pochu@debian.org>  Wed, 14 Sep 2016 12:49:23 +0200
 
 weston (1.11.91-1) experimental; urgency=medium
 

commit 5c76e030e12f6940b79da39a22376e37206e651e
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Wed Sep 14 12:28:03 2016 +0200

    Use wildcards in weston.install

diff --git a/debian/changelog b/debian/changelog
index b84e13b..a64ecea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 weston (1.11.94-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * debian/weston.install: use wildcards for libweston{,-desktop}.so.*.
 
  -- Emilio Pozuelo Monfort <pochu@debian.org>  Wed, 14 Sep 2016 12:14:59 +0200
 
diff --git a/debian/weston.install b/debian/weston.install
index c25b105..d5d23da 100644
--- a/debian/weston.install
+++ b/debian/weston.install
@@ -11,11 +11,9 @@ usr/lib/weston/weston-ivi-shell-user-interface
 usr/lib/weston/weston-screenshooter
 usr/lib/weston/weston-simple-im
 usr/lib/*/libweston-1.so
-usr/lib/*/libweston-1.so.0.11.91
-usr/lib/*/libweston-1.so.0
-usr/lib/*/libweston-desktop-1.so.0
+usr/lib/*/libweston-1.so.*
+usr/lib/*/libweston-desktop-1.so.*
 usr/lib/*/libweston-desktop-1.so
-usr/lib/*/libweston-desktop-1.so.0.11.91
 usr/lib/*/libweston-1/x11-backend.so
 usr/lib/*/libweston-1/xwayland.so
 usr/lib/*/libweston-1/headless-backend.so

commit 0e04442808bfade75accabd24c4df39f1395ace4
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Wed Sep 14 12:15:11 2016 +0200

    New upstream release

diff --git a/debian/changelog b/debian/changelog
index c7ac90e..b84e13b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+weston (1.11.94-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Emilio Pozuelo Monfort <pochu@debian.org>  Wed, 14 Sep 2016 12:14:59 +0200
+
 weston (1.11.91-1) experimental; urgency=medium
 
   * New upstream pre-release.

commit 870f384d0eb364ba049a73f682cef981704c3385
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue Sep 13 12:18:23 2016 -0700

    configure.ac: bump to version 1.11.94 for the RC2 release

diff --git a/configure.ac b/configure.ac
index 076b336..bd59725 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
 m4_define([weston_major_version],  [1])
 m4_define([weston_minor_version],  [11])
-m4_define([weston_micro_version],  [93])
+m4_define([weston_micro_version],  [94])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 m4_define([libweston_major_version], [1])
 m4_define([libweston_minor_version], [11])
-m4_define([libweston_patch_version], [93])
+m4_define([libweston_patch_version], [94])
 
 AC_PREREQ([2.64])
 AC_INIT([weston],

commit 0abf8903cbdc95d1ddc464476efe0db4fd710f06
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Sun Sep 11 11:34:47 2016 +0200

    libweston-desktop/xdg_shell_v6: Raise errors on not-yet-possible requests
    
    These requests need a mapped surface, which can only happen after the
    initial configure event.
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index fbf3e69..d4d0112 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -349,6 +349,13 @@ weston_desktop_xdg_toplevel_protocol_show_window_menu(struct wl_client *wl_clien
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	if (!toplevel->base.configured) {
+		wl_resource_post_error(toplevel->resource,
+				       ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+				       "Surface has not been configured yet");
+		return;
+	}
+
 	weston_desktop_api_show_window_menu(toplevel->base.desktop,
 					    dsurface, seat, x, y);
 }
@@ -366,6 +373,13 @@ weston_desktop_xdg_toplevel_protocol_move(struct wl_client *wl_client,
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	if (!toplevel->base.configured) {
+		wl_resource_post_error(toplevel->resource,
+				       ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+				       "Surface has not been configured yet");
+		return;
+	}
+
 	weston_desktop_api_move(toplevel->base.desktop, dsurface, seat, serial);
 }
 
@@ -383,6 +397,13 @@ weston_desktop_xdg_toplevel_protocol_resize(struct wl_client *wl_client,
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	if (!toplevel->base.configured) {
+		wl_resource_post_error(toplevel->resource,
+				       ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+				       "Surface has not been configured yet");
+		return;
+	}
+
 	weston_desktop_api_resize(toplevel->base.desktop,
 				  dsurface, seat, serial, edges);
 }

commit 3d7e60798a23026d9397d5cff56127917998e78a
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Sun Sep 11 11:29:23 2016 +0200

    libweston-desktop/xdg_shell_v6: Add surface as needed
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index 70e9132..fbf3e69 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -284,6 +284,18 @@ static void
 weston_desktop_xdg_surface_schedule_configure(struct weston_desktop_xdg_surface *surface);
 
 static void
+weston_desktop_xdg_toplevel_ensure_added(struct weston_desktop_xdg_toplevel *toplevel)
+{
+	if (toplevel->added)
+		return;
+
+	weston_desktop_api_surface_added(toplevel->base.desktop,
+					 toplevel->base.desktop_surface);
+	weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
+	toplevel->added = true;
+}
+
+static void
 weston_desktop_xdg_toplevel_protocol_set_parent(struct wl_client *wl_client,
 						struct wl_resource *resource,
 						struct wl_resource *parent_resource)
@@ -296,6 +308,8 @@ weston_desktop_xdg_toplevel_protocol_set_parent(struct wl_client *wl_client,
 
 	if (parent_resource != NULL)
 		parent = wl_resource_get_user_data(parent_resource);
+
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_set_parent(toplevel->base.desktop, dsurface, parent);
 }
 
@@ -416,6 +430,7 @@ weston_desktop_xdg_toplevel_protocol_set_maximized(struct wl_client *wl_client,
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_maximized_requested(toplevel->base.desktop, dsurface, true);
 }
 
@@ -428,6 +443,7 @@ weston_desktop_xdg_toplevel_protocol_unset_maximized(struct wl_client *wl_client
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_maximized_requested(toplevel->base.desktop, dsurface, false);
 }
 
@@ -445,6 +461,7 @@ weston_desktop_xdg_toplevel_protocol_set_fullscreen(struct wl_client *wl_client,
 	if (output_resource != NULL)
 		output = wl_resource_get_user_data(output_resource);
 
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_fullscreen_requested(toplevel->base.desktop, dsurface,
 						true, output);
 }
@@ -458,6 +475,7 @@ weston_desktop_xdg_toplevel_protocol_unset_fullscreen(struct wl_client *wl_clien
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_fullscreen_requested(toplevel->base.desktop, dsurface,
 						false, NULL);
 }
@@ -471,6 +489,7 @@ weston_desktop_xdg_toplevel_protocol_set_minimized(struct wl_client *wl_client,
 	struct weston_desktop_xdg_toplevel *toplevel =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_toplevel_ensure_added(toplevel);
 	weston_desktop_api_minimized_requested(toplevel->base.desktop, dsurface);
 }
 
@@ -584,10 +603,7 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
 	bool reconfigure = false;
 
 	if (!wsurface->buffer_ref.buffer && !toplevel->added) {
-		weston_desktop_api_surface_added(toplevel->base.desktop,
-					         toplevel->base.desktop_surface);
-		weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
-		toplevel->added = true;
+		weston_desktop_xdg_toplevel_ensure_added(toplevel);
 		return;
 	}
 	if (!wsurface->buffer_ref.buffer)

commit e30b5fb2e7596dc033218d15e513a7c0ba182fc5
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Fri Sep 9 19:53:38 2016 +0200

    Revert "terminal: Fix crash due to race condition in init"
    
    This reverts commit 5c611d933f60f720db98331c9c1c6ed4420f9782.

diff --git a/clients/terminal.c b/clients/terminal.c
index 34bc2c9..6257cb7 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2976,7 +2976,6 @@ terminal_create(struct display *display)
 	cairo_surface_destroy(surface);
 
 	terminal_resize(terminal, 20, 5); /* Set minimum size first */
-	terminal_resize_cells(terminal, 20, 5);
 	terminal_resize(terminal, 80, 25);
 
 	wl_list_insert(terminal_list.prev, &terminal->link);

commit 6967f0e2d25adca0a486404409aed18f51a6010c
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Thu Aug 18 15:51:38 2016 +0200

    libweston-desktop/xdg_shell_v5: Add surface as needed
    
    This way we are sure the compositor is aware of a surface when we
    forward a request for said surface.
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
index f8943ab..83e5d30 100644
--- a/libweston-desktop/xdg-shell-v5.c
+++ b/libweston-desktop/xdg-shell-v5.c
@@ -43,6 +43,7 @@ struct weston_desktop_xdg_surface {
 	struct wl_resource *resource;
 	struct weston_desktop_surface *surface;
 	struct weston_desktop *desktop;
+	bool added;
 	struct wl_event_source *add_idle;
 	struct wl_event_source *configure_idle;
 	uint32_t configure_serial;
@@ -66,6 +67,19 @@ struct weston_desktop_xdg_popup {
 };
 
 static void
+weston_desktop_xdg_surface_ensure_added(struct weston_desktop_xdg_surface *surface)
+{
+	if (surface->added)
+		return;
+
+	if (surface->add_idle != NULL)
+		wl_event_source_remove(surface->add_idle);
+	surface->add_idle = NULL;
+	weston_desktop_api_surface_added(surface->desktop, surface->surface);
+	surface->added = true;
+}
+
+static void
 weston_desktop_xdg_surface_send_configure(void *data)
 {
 	struct weston_desktop_xdg_surface *surface = data;
@@ -210,12 +224,7 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
 							    surface->next_geometry);
 		}
 
-		if (surface->add_idle != NULL) {
-			wl_event_source_remove(surface->add_idle);
-			surface->add_idle = NULL;
-			weston_desktop_api_surface_added(surface->desktop,
-						       surface->surface);
-		}
+		weston_desktop_xdg_surface_ensure_added(surface);
 		weston_desktop_api_committed(surface->desktop, surface->surface,
 					     sx, sy);
 	}
@@ -283,7 +292,9 @@ weston_desktop_xdg_surface_destroy(struct weston_desktop_surface *dsurface,
 {
 	struct weston_desktop_xdg_surface *surface = user_data;
 
-	weston_desktop_api_surface_removed(surface->desktop, surface->surface);
+	if (surface->added)
+		weston_desktop_api_surface_removed(surface->desktop,
+						   surface->surface);
 
 	if (surface->add_idle != NULL)
 		wl_event_source_remove(surface->add_idle);
@@ -307,6 +318,8 @@ weston_desktop_xdg_surface_protocol_set_parent(struct wl_client *wl_client,
 
 	if (parent_resource != NULL)
 		parent = wl_resource_get_user_data(parent_resource);
+
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_set_parent(surface->desktop, dsurface, parent);
 }
 
@@ -346,6 +359,7 @@ weston_desktop_xdg_surface_protocol_show_window_menu(struct wl_client *wl_client
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_show_window_menu(surface->desktop, dsurface, seat, x, y);
 }
 
@@ -362,6 +376,7 @@ weston_desktop_xdg_surface_protocol_move(struct wl_client *wl_client,
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_move(surface->desktop, dsurface, seat, serial);
 }
 
@@ -379,6 +394,7 @@ weston_desktop_xdg_surface_protocol_resize(struct wl_client *wl_client,
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, edges);
 }
 
@@ -425,6 +441,7 @@ weston_desktop_xdg_surface_protocol_set_maximized(struct wl_client *wl_client,
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_maximized_requested(surface->desktop, dsurface, true);
 }
 
@@ -437,6 +454,7 @@ weston_desktop_xdg_surface_protocol_unset_maximized(struct wl_client *wl_client,
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_maximized_requested(surface->desktop, dsurface, false);
 }
 
@@ -454,6 +472,7 @@ weston_desktop_xdg_surface_protocol_set_fullscreen(struct wl_client *wl_client,
 	if (output_resource != NULL)
 		output = wl_resource_get_user_data(output_resource);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_fullscreen_requested(surface->desktop, dsurface,
 						true, output);
 }
@@ -467,6 +486,7 @@ weston_desktop_xdg_surface_protocol_unset_fullscreen(struct wl_client *wl_client
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_fullscreen_requested(surface->desktop, dsurface,
 						false, NULL);
 }
@@ -480,6 +500,7 @@ weston_desktop_xdg_surface_protocol_set_minimized(struct wl_client *wl_client,
 	struct weston_desktop_xdg_surface *surface =
 		weston_desktop_surface_get_implementation_data(dsurface);
 
+	weston_desktop_xdg_surface_ensure_added(surface);
 	weston_desktop_api_minimized_requested(surface->desktop, dsurface);
 }
 
@@ -578,11 +599,12 @@ weston_desktop_xdg_shell_protocol_use_unstable_version(struct wl_client *wl_clie
 }
 
 static void
-weston_desktop_xdg_surface_add(void *user_data)
+weston_desktop_xdg_surface_add_idle_callback(void *user_data)
 {
 	struct weston_desktop_xdg_surface *surface = user_data;
+
 	surface->add_idle = NULL;
-	weston_desktop_api_surface_added(surface->desktop, surface->surface);
+	weston_desktop_xdg_surface_ensure_added(surface);
 }
 
 static void
@@ -632,7 +654,7 @@ weston_desktop_xdg_shell_protocol_get_xdg_surface(struct wl_client *wl_client,
 
 	surface->add_idle =
 		wl_event_loop_add_idle(loop,
-				       weston_desktop_xdg_surface_add,
+				       weston_desktop_xdg_surface_add_idle_callback,
 				       surface);
 }
 

commit 920cf048f36b1aa5bb121de809ac37b900baf3e0
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Tue Aug 16 14:26:20 2016 +0200

    desktop-shell: Add back the saved position and rotation for fullscreen/maximized
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 35dbbaa..a43c2e2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1950,14 +1950,13 @@ unset_fullscreen(struct shell_surface *shsurf)
 					 shsurf->saved_x, shsurf->saved_y);
 	else
 		weston_view_set_initial_position(shsurf->view, shsurf->shell);
+	shsurf->saved_position_valid = false;
 
 	if (shsurf->saved_rotation_valid) {
 		wl_list_insert(&shsurf->view->geometry.transformation_list,
 		               &shsurf->rotation.transform.link);
 		shsurf->saved_rotation_valid = false;
 	}
-
-	/* Layer is updated in set_surface_type(). */
 }
 
 static void
@@ -1974,14 +1973,13 @@ unset_maximized(struct shell_surface *shsurf)
 					 shsurf->saved_x, shsurf->saved_y);
 	else
 		weston_view_set_initial_position(shsurf->view, shsurf->shell);
+	shsurf->saved_position_valid = false;
 
 	if (shsurf->saved_rotation_valid) {
 		wl_list_insert(&shsurf->view->geometry.transformation_list,
 			       &shsurf->rotation.transform.link);
 		shsurf->saved_rotation_valid = false;
 	}
-
-	/* Layer is updated in set_surface_type(). */
 }
 
 static void
@@ -2490,6 +2488,20 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
 	if (was_maximized)
 		unset_maximized(shsurf);
 
+	if ((shsurf->state.fullscreen || shsurf->state.maximized) &&
+	    !shsurf->saved_position_valid) {
+		shsurf->saved_x = shsurf->view->geometry.x;
+		shsurf->saved_y = shsurf->view->geometry.y;
+		shsurf->saved_position_valid = true;
+
+		if (!wl_list_empty(&shsurf->rotation.transform.link)) {
+			wl_list_remove(&shsurf->rotation.transform.link);
+			wl_list_init(&shsurf->rotation.transform.link);
+			weston_view_geometry_dirty(shsurf->view);
+			shsurf->saved_rotation_valid = true;
+		}
+	}
+
 	if (shsurf->state.fullscreen) {
 		shell_configure_fullscreen(shsurf);
 	} else if (shsurf->state.maximized) {

commit 18a81acc17f7d8e49db3ab3f4827252114a4899a
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Tue Aug 16 14:26:03 2016 +0200

    desktop-shell: Unset fullscreen/maximized state on commit
    
    This only stores the current state, as libweston-desktop is still in
    charge of double-buffering it.
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 653e85b..35dbbaa 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -129,6 +129,8 @@ struct shell_surface {
 	struct weston_output *output;
 
 	struct surface_state {
+		bool fullscreen;
+		bool maximized;
 		bool lowered;
 	} state;
 
@@ -2404,10 +2406,10 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
 	struct weston_seat *seat;
 
 	/* initial positioning, see also configure() */
-	if (weston_desktop_surface_get_fullscreen(shsurf->desktop_surface)) {
+	if (shsurf->state.fullscreen) {
 		center_on_output(shsurf->view, shsurf->fullscreen_output);
 		shell_map_fullscreen(shsurf);
-	} else if (weston_desktop_surface_get_maximized(shsurf->desktop_surface)) {
+	} else if (shsurf->state.maximized) {
 		set_maximized_position(shell, shsurf);
 	} else {
 		weston_view_set_initial_position(shsurf->view, shell);
@@ -2418,7 +2420,7 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
 
 	weston_view_update_transform(shsurf->view);
 	shsurf->view->is_mapped = true;
-	if (weston_desktop_surface_get_maximized(shsurf->desktop_surface)) {
+	if (shsurf->state.maximized) {
 		surface->output = shsurf->output;
 		shsurf->view->output = shsurf->output;
 	}
@@ -2429,8 +2431,7 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
 				 WESTON_ACTIVATE_FLAG_CONFIGURE);
 	}
 
-	if (!weston_desktop_surface_get_maximized(shsurf->desktop_surface) &&
-	    !weston_desktop_surface_get_fullscreen(shsurf->desktop_surface)) {
+	if (!shsurf->state.fullscreen && !shsurf->state.maximized) {
 		switch (shell->win_animation_type) {
 		case ANIMATION_FADE:
 			weston_fade_run(shsurf->view, 0.0, 1.0, 300.0, NULL, NULL);
@@ -2455,10 +2456,20 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
 		weston_desktop_surface_get_surface(desktop_surface);
 	struct weston_view *view = shsurf->view;
 	struct desktop_shell *shell = data;
+	bool was_fullscreen;
+	bool was_maximized;
 
 	if (surface->width == 0)
 		return;
 
+	was_fullscreen = shsurf->state.fullscreen;
+	was_maximized = shsurf->state.maximized;
+
+	shsurf->state.fullscreen =
+		weston_desktop_surface_get_fullscreen(desktop_surface);
+	shsurf->state.maximized =
+		weston_desktop_surface_get_maximized(desktop_surface);
+
 	if (!weston_surface_is_mapped(surface)) {
 		map(shell, shsurf, sx, sy);
 		surface->is_mapped = true;
@@ -2469,12 +2480,19 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
 
 	if (sx == 0 && sy == 0 &&
 	    shsurf->last_width == surface->width &&
-	    shsurf->last_height == surface->height)
+	    shsurf->last_height == surface->height &&
+	    was_fullscreen == shsurf->state.fullscreen &&
+	    was_maximized == shsurf->state.maximized)
 	    return;
 
-	if (weston_desktop_surface_get_fullscreen(desktop_surface))
+	if (was_fullscreen)
+		unset_fullscreen(shsurf);
+	if (was_maximized)
+		unset_maximized(shsurf);
+
+	if (shsurf->state.fullscreen) {
 		shell_configure_fullscreen(shsurf);
-	else if (weston_desktop_surface_get_maximized(desktop_surface)) {
+	} else if (shsurf->state.maximized) {
 		set_maximized_position(shell, shsurf);
 		surface->output = shsurf->output;
 	} else {
@@ -2531,8 +2549,6 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen,
 
 		width = shsurf->output->width;
 		height = shsurf->output->height;
-	} else {
-		unset_fullscreen(shsurf);
 	}
 	weston_desktop_surface_set_fullscreen(desktop_surface, fullscreen);
 	weston_desktop_surface_set_size(desktop_surface, width, height);
@@ -2632,8 +2648,6 @@ set_maximized(struct shell_surface *shsurf, bool maximized)
 
 		width = area.width;
 		height = area.height;
-	} else {
-		unset_maximized(shsurf);
 	}
 	weston_desktop_surface_set_maximized(desktop_surface, maximized);
 	weston_desktop_surface_set_size(desktop_surface, width, height);

commit 631560790e260d40ba3d81c2b0b042fa89a080b1
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue Sep 6 14:47:33 2016 -0700

    configure.ac: bump to version 1.11.93 for the RC1 release

diff --git a/configure.ac b/configure.ac
index 3d4b700..076b336 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
 m4_define([weston_major_version],  [1])
 m4_define([weston_minor_version],  [11])
-m4_define([weston_micro_version],  [92])
+m4_define([weston_micro_version],  [93])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 m4_define([libweston_major_version], [1])
 m4_define([libweston_minor_version], [11])
-m4_define([libweston_patch_version], [92])
+m4_define([libweston_patch_version], [93])
 
 AC_PREREQ([2.64])
 AC_INIT([weston],

commit 85571a300206efbffdd12f550f1dbc2d59ac005e
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Thu Sep 1 15:19:46 2016 +0100

    compositor-wayland: Only destroy the egl_window when using GLES.
    
    This prevents a segfault when unplugging an output when using pixman.
    
    Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>

diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
index 7c12b4c..c223baa 100644
--- a/libweston/compositor-wayland.c
+++ b/libweston/compositor-wayland.c
@@ -627,9 +627,9 @@ wayland_output_destroy(struct weston_output *output_base)
 		pixman_renderer_output_destroy(output_base);
 	} else {
 		gl_renderer->output_destroy(output_base);
+		wl_egl_window_destroy(output->gl.egl_window);
 	}
 
-	wl_egl_window_destroy(output->gl.egl_window);
 	wl_surface_destroy(output->parent.surface);
 	if (output->parent.shell_surface)
 		wl_shell_surface_destroy(output->parent.shell_surface);

commit 1714f01e0cfcc6b71946d5c8d9898a2eaba86fac
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date:   Thu Aug 18 16:45:30 2016 +0200

    libweston-desktop/xwayland: Do not over-destroy the view
    
    With this weston_view_destroy() call, Xwayland popups make Weston freeze
    in a busy-loop (probably corrupted wl_list).
    
    Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
index cb08323..bd68bc6 100644
--- a/libweston-desktop/xwayland.c
+++ b/libweston-desktop/xwayland.c
@@ -152,13 +152,11 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface,
 	wl_list_remove(&surface->resource_destroy_listener.link);
 
 	weston_desktop_surface_unset_relative_to(surface->surface);
-	if (surface->added) {
+	if (surface->added)
 		weston_desktop_api_surface_removed(surface->desktop,
 						   surface->surface);
-	} else if (surface->state == XWAYLAND) {
+	else if (surface->state == XWAYLAND)
 		weston_desktop_surface_unlink_view(surface->view);
-		weston_view_destroy(surface->view);
-	}
 
 	free(surface);
 }

commit 5c611d933f60f720db98331c9c1c6ed4420f9782
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Mon Aug 29 16:28:08 2016 -0700

    terminal: Fix crash due to race condition in init
    
    weston-terminal intermittently crashes on startup.  This occurs because
    some parameters in the weston_terminal structure such as data_pitch,
    don't get set to non-zero until the resize_handler() callback gets
    triggered.  That callback makes a call to terminal_resize_cells(), to
    calculate the proper values for these parameters.
    
    On occasion, the resize handler call is slow to resolve, and the program
    proceeds to start processing characters for the terminal window.  With
    the parameters defaulting to zero, certain calculations come out wrong,
    leading the program to attempt to scroll the buffer when it shouldn't,
    and thus follows the crash.
    
    Instead, force the call to terminal_resize_cells() during the init, with
    some dummy defaults, to ensure the parameters are always non-zero.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=97539
    Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
    Reviewed-by: Yong Bakos <ybakos@humanoriented.com>

diff --git a/clients/terminal.c b/clients/terminal.c
index 6257cb7..34bc2c9 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2976,6 +2976,7 @@ terminal_create(struct display *display)
 	cairo_surface_destroy(surface);
 
 	terminal_resize(terminal, 20, 5); /* Set minimum size first */
+	terminal_resize_cells(terminal, 20, 5);
 	terminal_resize(terminal, 80, 25);
 
 	wl_list_insert(terminal_list.prev, &terminal->link);

commit c6ae8126e1d0b83b76b272f02ef7a4319336c116
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue Aug 30 18:38:27 2016 -0700

    clients: Use ARRAY_LENGTH macro in weston-simple-im
    
    Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
    Reviewed-by: Yong Bakos <ybakos@humanoriented.com>

diff --git a/clients/weston-simple-im.c b/clients/weston-simple-im.c
index 2d23930..1663d84 100644
--- a/clients/weston-simple-im.c
+++ b/clients/weston-simple-im.c
@@ -30,11 +30,11 @@
 #include <unistd.h>
 #include <sys/mman.h>
 
-
 #include <linux/input.h>
 
 #include "window.h"
 #include "input-method-unstable-v1-client-protocol.h"
+#include "shared/helpers.h"
 
 enum compose_state {
 	state_normal,
@@ -398,7 +398,7 @@ simple_im_key_handler(struct simple_im *keyboard,
 		if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
 			return;
 
-		for (i = 0; i < sizeof(ignore_keys_on_compose) / sizeof(ignore_keys_on_compose[0]); i++) {
+		for (i = 0; i < ARRAY_LENGTH(ignore_keys_on_compose); i++) {
 			if (sym == ignore_keys_on_compose[i]) {
 				zwp_input_method_context_v1_key(context,
 								keyboard->serial,
@@ -414,7 +414,7 @@ simple_im_key_handler(struct simple_im *keyboard,
 		keyboard->compose_seq.keys[i] = sym;
 
 		cs = bsearch (&keyboard->compose_seq, compose_seqs,
-			      sizeof(compose_seqs) / sizeof(compose_seqs[0]),
+			      ARRAY_LENGTH(compose_seqs),
 			      sizeof(compose_seqs[0]), compare_compose_keys);
 
 		if (cs) {

commit b0e4abd215bc30cf53c17a23394820ffa2214240
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue Aug 30 12:11:43 2016 -0700

    configure.ac: (Re-)bump to version 1.11.92 for the beta release

diff --git a/configure.ac b/configure.ac
index 2770a29..3d4b700 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version],  [1])
-m4_define([weston_minor_version], [11])
-m4_define([weston_micro_version], [92])
+m4_define([weston_minor_version],  [11])
+m4_define([weston_micro_version],  [92])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 m4_define([libweston_major_version], [1])

commit b3197f447e1310cd44552a76222c0b94c9f8bc8a
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue Aug 30 12:05:27 2016 -0700

    Revert "desktop-shell: Enable per-output fade animations"
    
    This reverts commit fde5adbedb2706f8e160156d9a08bc014d2e42f3.
    
    (Accidental landing)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 9a96560..653e85b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -194,9 +194,6 @@ surface_rotate(struct shell_surface *surface, struct weston_pointer *pointer);
 static void
 shell_fade_startup(struct desktop_shell *shell);
 
-static void
-shell_fade(struct desktop_shell *shell, enum fade_type type);
-
 static struct shell_seat *
 get_shell_seat(struct weston_seat *seat);
 
@@ -2788,6 +2785,9 @@ static const struct weston_desktop_api shell_desktop_api = {
  * end of libweston-desktop *
  * ************************ */
 static void
+shell_fade(struct desktop_shell *shell, enum fade_type type);
+
+static void
 configure_static_view(struct weston_view *ev, struct weston_layer *layer)
 {
 	struct weston_view *v, *next;
@@ -3770,16 +3770,16 @@ unlock(struct desktop_shell *shell)
 }
 
 static void
-shell_fade_done_for_output(struct weston_view_animation *animation, void *data)
+shell_fade_done(struct weston_view_animation *animation, void *data)
 {
-	struct shell_output *shell_output = data;
-	struct desktop_shell *shell = shell_output->shell;
+	struct desktop_shell *shell = data;
 
-	shell_output->fade.animation = NULL;
-	switch (shell_output->fade.type) {
+	shell->fade.animation = NULL;
+
+	switch (shell->fade.type) {
 	case FADE_IN:
-		weston_surface_destroy(shell_output->fade.view->surface);
-		shell_output->fade.view = NULL;
+		weston_surface_destroy(shell->fade.view->surface);
+		shell->fade.view = NULL;
 		break;
 	case FADE_OUT:
 		lock(shell);
@@ -3790,7 +3790,7 @@ shell_fade_done_for_output(struct weston_view_animation *animation, void *data)
 }
 
 static struct weston_view *
-shell_fade_create_surface_for_output(struct desktop_shell *shell, struct shell_output *shell_output)
+shell_fade_create_surface(struct desktop_shell *shell)
 {
 	struct weston_compositor *compositor = shell->compositor;
 	struct weston_surface *surface;
@@ -3806,8 +3806,8 @@ shell_fade_create_surface_for_output(struct desktop_shell *shell, struct shell_o
 		return NULL;
 	}
 
-	weston_surface_set_size(surface, shell_output->output->width, shell_output->output->height);
-	weston_view_set_position(view, shell_output->output->x, shell_output->output->y);
+	weston_surface_set_size(surface, 8192, 8192);
+	weston_view_set_position(view, 0, 0);
 	weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0);
 	weston_layer_entry_insert(&compositor->fade_layer.view_list,
 				  &view->layer_link);
@@ -3822,7 +3822,6 @@ static void
 shell_fade(struct desktop_shell *shell, enum fade_type type)
 {
 	float tint;
-	struct shell_output *shell_output;
 
 	switch (type) {
 	case FADE_IN:
@@ -3832,38 +3831,36 @@ shell_fade(struct desktop_shell *shell, enum fade_type type)
 		tint = 1.0;
 		break;
 	default:
+		weston_log("shell: invalid fade type\n");
 		return;
 	}
 
-	/* Create a separate fade surface for each output */
-	wl_list_for_each(shell_output, &shell->output_list, link) {
-		shell_output->fade.type = type;
+	shell->fade.type = type;
 
-		if (shell_output->fade.view == NULL) {
-			shell_output->fade.view = shell_fade_create_surface_for_output(shell, shell_output);
-			if (!shell_output->fade.view)
-				return;
+	if (shell->fade.view == NULL) {
+		shell->fade.view = shell_fade_create_surface(shell);
+		if (!shell->fade.view)
+			return;
 
-			shell_output->fade.view->alpha = 1.0 - tint;
-			weston_view_update_transform(shell_output->fade.view);
-		}
+		shell->fade.view->alpha = 1.0 - tint;
+		weston_view_update_transform(shell->fade.view);
+	}
 
-		if (shell_output->fade.view->output == NULL) {
-			/* If the black view gets a NULL output, we lost the
-			 * last output and we'll just cancel the fade.  This
-			 * happens when you close the last window under the
-			 * X11 or Wayland backends. */
-			shell->locked = false;
-			weston_surface_destroy(shell_output->fade.view->surface);
-			shell_output->fade.view = NULL;
-		} else if (shell_output->fade.animation) {
-			weston_fade_update(shell_output->fade.animation, tint);
-		} else {
-			shell_output->fade.animation =
-				weston_fade_run(shell_output->fade.view,
-						1.0 - tint, tint, 300.0,
-						shell_fade_done_for_output, shell_output);
-		}
+	if (shell->fade.view->output == NULL) {
+		/* If the black view gets a NULL output, we lost the
+		 * last output and we'll just cancel the fade.  This
+		 * happens when you close the last window under the
+		 * X11 or Wayland backends. */
+		shell->locked = false;
+		weston_surface_destroy(shell->fade.view->surface);
+		shell->fade.view = NULL;
+	} else if (shell->fade.animation) {
+		weston_fade_update(shell->fade.animation, tint);
+	} else {
+		shell->fade.animation =
+			weston_fade_run(shell->fade.view,
+					1.0 - tint, tint, 300.0,
+					shell_fade_done, shell);
 	}
 }
 
@@ -3871,7 +3868,6 @@ static void
 do_shell_fade_startup(void *data)
 {
 	struct desktop_shell *shell = data;
-	struct shell_output *shell_output;
 
 	if (shell->startup_animation_type == ANIMATION_FADE) {
 		shell_fade(shell, FADE_IN);
@@ -3879,10 +3875,8 @@ do_shell_fade_startup(void *data)
 		weston_log("desktop shell: "
 			   "unexpected fade-in animation type %d\n",
 			   shell->startup_animation_type);


Reply to: