[weston PATCH v6 6/7] shell: fix the following issues for fullscreen

juan.j.zhao at linux.intel.com juan.j.zhao at linux.intel.com
Thu Feb 16 23:26:15 PST 2012


From: Juan Zhao <juan.j.zhao at linux.intel.com>

---
 src/shell.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 1d95313..9ef666f 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -71,7 +71,6 @@ struct wl_shell {
 	} screensaver;
 };
 
-/*FIXME:Using bit flag for the type due to some surface may be both toplevel and fullscreen*/
 enum shell_surface_type {
 	SHELL_SURFACE_NONE,
 
@@ -300,7 +299,9 @@ weston_surface_resize(struct shell_surface *shsurf,
 {
 	struct weston_resize_grab *resize;
 
-	/* FIXME: Reject if fullscreen */
+	/* FIXME: Reject if maximised */
+	if (shsurf->type == SHELL_SURFACE_FULLSCREEN)
+		return;
 
 	if (edges == 0 || edges > 15 ||
 	    (edges & 3) == 3 || (edges & 12) == 12)
@@ -332,7 +333,9 @@ shell_surface_resize(struct wl_client *client, struct wl_resource *resource,
 	struct weston_input_device *wd = input_resource->data;
 	struct shell_surface *shsurf = resource->data;
 
-	/* FIXME: Reject if fullscreen */
+	/* FIXME: Reject if maximised */
+	if (shsurf->type == SHELL_SURFACE_FULLSCREEN)
+		return;
 
 	if (wd->input_device.button_count == 0 ||
 	    wd->input_device.grab_time != time ||
@@ -1311,7 +1314,6 @@ weston_surface_set_fullscreen(struct weston_surface *surface)
 	struct shell_surface *shsurf;
 
 	center_on_output(surface, output);
-	surface->output = output;
 
 	switch(surface->fs_support.fs_method) {
 	case WESTON_SURFACE_FULLSCREEN_DEFAULT:
@@ -1330,7 +1332,6 @@ weston_surface_set_fullscreen(struct weston_surface *surface)
 		}
 		weston_surface_set_position(surface, output->x, output->y);
 		weston_surface_damage(surface);
-		weston_output_damage(output);
 		break;
 	case WESTON_SURFACE_FULLSCREEN_DRIVER:
 		break;
@@ -1582,7 +1583,6 @@ configure(struct weston_shell *base, struct weston_surface *surface,
 		break;
 	}
 
-	/*  XXX: would a fullscreen surface need the same handling? */
 	if (do_configure) {
 		weston_surface_configure(surface, x, y, width, height);
 		weston_surface_assign_output(surface);
-- 
1.7.5.4



More information about the wayland-devel mailing list