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

weston: Changes to 'upstream-experimental'



Rebased ref, commits from common ancestor:
commit e302b3ef77894cb9fd4113c873a5502efc9a8dd6
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue Jul 24 16:01:29 2012 -0400

    Bump version to 0.95.0

diff --git a/configure.ac b/configure.ac
index 231a024..c35d987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([weston],
-        [0.94.90],
+        [0.95.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=weston],
         [weston],
         [http://wayland.freedesktop.org/])

commit d1936b9e2b352e93ace1b3609740ce4902b33a9e
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 22:59:33 2012 -0400

    desktop-shell: Break command lines into env vars, executable and arguments
    
    We now support specifying environment variables and arguments in launchers
    by saying
    
      path=GDK_BACKEND=wayland gnome-terminal --full-screen
    
    for example.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=47920

diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 61599c3..082a30a 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -34,6 +34,7 @@
 #include <sys/epoll.h> 
 #include <linux/input.h>
 #include <libgen.h>
+#include <ctype.h>
 #include <time.h>
 
 #include <wayland-client.h>
@@ -90,8 +91,10 @@ struct panel_launcher {
 	struct panel *panel;
 	cairo_surface_t *icon;
 	int focused, pressed;
-	const char *path;
+	char *path;
 	struct wl_list link;
+	struct wl_array envp;
+	struct wl_array argv;
 };
 
 struct panel_clock {
@@ -173,6 +176,7 @@ show_menu(struct panel *panel, struct input *input, uint32_t time)
 static void
 panel_launcher_activate(struct panel_launcher *widget)
 {
+	char **argv;
 	pid_t pid;
 
 	pid = fork();
@@ -184,8 +188,9 @@ panel_launcher_activate(struct panel_launcher *widget)
 	if (pid)
 		return;
 
-	if (execl(widget->path, widget->path, NULL) < 0) {
-		fprintf(stderr, "execl '%s' failed: %m\n", widget->path);
+	argv = widget->argv.data;
+	if (execve(argv[0], argv, widget->envp.data) < 0) {
+		fprintf(stderr, "execl '%s' failed: %m\n", argv[0]);
 		exit(1);
 	}
 }
@@ -469,11 +474,57 @@ static void
 panel_add_launcher(struct panel *panel, const char *icon, const char *path)
 {
 	struct panel_launcher *launcher;
+	char *start, *p, *eq, **ps;
+	int i, j, k;
 
 	launcher = malloc(sizeof *launcher);
 	memset(launcher, 0, sizeof *launcher);
 	launcher->icon = cairo_image_surface_create_from_png(icon);
 	launcher->path = strdup(path);
+
+	wl_array_init(&launcher->envp);
+	wl_array_init(&launcher->argv);
+	for (i = 0; __environ[i]; i++) {
+		ps = wl_array_add(&launcher->envp, sizeof *ps);
+		*ps = __environ[i];
+	}
+	j = 0;
+
+	start = launcher->path;
+	while (*start) {
+		for (p = start, eq = NULL; *p && !isspace(*p); p++)
+			if (*p == '=')
+				eq = p;
+
+		if (eq && j == 0) {
+			ps = launcher->envp.data;
+			for (k = 0; k < i; k++)
+				if (strncmp(ps[k], start, eq - start) == 0) {
+					ps[k] = start;
+					break;
+				}
+			if (k == i) {
+				ps = wl_array_add(&launcher->envp, sizeof *ps);
+				*ps = start;
+				i++;
+			}
+		} else {
+			ps = wl_array_add(&launcher->argv, sizeof *ps);
+			*ps = start;
+			j++;
+		}
+
+		while (*p && isspace(*p))
+			*p++ = '\0';
+
+		start = p;
+	}
+
+	ps = wl_array_add(&launcher->envp, sizeof *ps);
+	*ps = NULL;
+	ps = wl_array_add(&launcher->argv, sizeof *ps);
+	*ps = NULL;
+
 	launcher->panel = panel;
 	wl_list_insert(panel->launcher_list.prev, &launcher->link);
 

commit df0faf79834630d16235795202f4f4132b886505
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 22:00:21 2012 -0400

    image: Add fullscreen support

diff --git a/clients/image.c b/clients/image.c
index 83ed231..711f0d8 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -43,6 +43,7 @@ struct image {
 	struct display *display;
 	char *filename;
 	cairo_surface_t *image;
+	int fullscreen;
 };
 
 static void
@@ -102,6 +103,15 @@ keyboard_focus_handler(struct window *window,
 	window_schedule_redraw(image->window);
 }
 
+static void
+fullscreen_handler(struct window *window, void *data)
+{
+	struct image *image = data;
+
+	image->fullscreen ^= 1;
+	window_set_fullscreen(window, image->fullscreen);
+}
+
 static struct image *
 image_create(struct display *display, const char *filename)
 {
@@ -129,6 +139,7 @@ image_create(struct display *display, const char *filename)
 	widget_set_redraw_handler(image->widget, redraw_handler);
 	window_set_keyboard_focus_handler(image->window,
 					  keyboard_focus_handler);
+	window_set_fullscreen_handler(image->window, fullscreen_handler);
 
 	widget_schedule_resize(image->widget, 500, 400);
 

commit 67ace20f8ebc2088d560874c49eb79ca122b68da
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 21:56:31 2012 -0400

    window.c: Add fullscreen handler to keep fullscreen state consistent

diff --git a/clients/terminal.c b/clients/terminal.c
index 7e7a9fb..dd35ceb 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2057,6 +2057,15 @@ static const struct wl_data_source_listener data_source_listener = {
 	data_source_cancelled
 };
 
+static void
+fullscreen_handler(struct window *window, void *data)
+{
+	struct terminal *terminal = data;
+
+	terminal->fullscreen ^= 1;
+	window_set_fullscreen(window, terminal->fullscreen);
+}
+
 static int
 handle_bound_key(struct terminal *terminal,
 		 struct input *input, uint32_t sym, uint32_t time)
@@ -2115,13 +2124,6 @@ key_handler(struct window *window, struct input *input, uint32_t time,
 		return;
 
 	switch (sym) {
-	case XKB_KEY_F11:
-		if (state == WL_KEYBOARD_KEY_STATE_RELEASED)
-			break;
-		terminal->fullscreen ^= 1;
-		window_set_fullscreen(window, terminal->fullscreen);
-		break;
-
 	case XKB_KEY_BackSpace:
 		if (modifiers & MOD_ALT_MASK)
 			ch[len++] = 0x1b;
@@ -2457,6 +2459,8 @@ terminal_create(struct display *display, int fullscreen)
 	window_set_key_handler(terminal->window, key_handler);
 	window_set_keyboard_focus_handler(terminal->window,
 					  keyboard_focus_handler);
+	window_set_fullscreen_handler(terminal->window, fullscreen_handler);
+
 	widget_set_redraw_handler(terminal->widget, redraw_handler);
 	widget_set_resize_handler(terminal->widget, resize_handler);
 	widget_set_button_handler(terminal->widget, button_handler);
diff --git a/clients/view.c b/clients/view.c
index ee861e4..b40a992 100644
--- a/clients/view.c
+++ b/clients/view.c
@@ -159,6 +159,15 @@ button_handler(struct widget *widget, struct input *input, uint32_t time,
 }
 
 static void
+fullscreen_handler(struct window *window, void *data)
+{
+	struct view *view = data;
+
+	view->fullscreen ^= 1;
+	window_set_fullscreen(window, view->fullscreen);
+}
+
+static void
 key_handler(struct window *window, struct input *input, uint32_t time,
 	    uint32_t key, uint32_t unicode,
 	    enum wl_keyboard_key_state state, void *data)
@@ -169,10 +178,6 @@ key_handler(struct window *window, struct input *input, uint32_t time,
 	        return;
 
 	switch (key) {
-	case KEY_F11:
-		view->fullscreen ^= 1;
-		window_set_fullscreen(window, view->fullscreen);
-		break;
 	case KEY_SPACE:
 	case KEY_PAGEDOWN:
 	case KEY_RIGHT:
@@ -238,6 +243,8 @@ view_create(struct display *display,
 	window_set_key_handler(view->window, key_handler);
 	window_set_keyboard_focus_handler(view->window,
 					  keyboard_focus_handler);
+	window_set_fullscreen_handler(view->window, fullscreen_handler);
+
 	widget_set_button_handler(view->widget, button_handler);
 	widget_set_resize_handler(view->widget, resize_handler);
 	widget_set_redraw_handler(view->widget, redraw_handler);
diff --git a/clients/window.c b/clients/window.c
index d374ab9..186eed9 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -157,6 +157,7 @@ struct window {
 	window_data_handler_t data_handler;
 	window_drop_handler_t drop_handler;
 	window_close_handler_t close_handler;
+	window_fullscreen_handler_t fullscreen_handler;
 
 	struct frame *frame;
 	struct widget *widget;
@@ -1560,7 +1561,8 @@ frame_menu_func(struct window *window, int index, void *data)
 		break;
 	case 1: /* fullscreen */
 		/* we don't have a way to get out of fullscreen for now */
-		window_set_fullscreen(window, 1);
+		if (window->fullscreen_handler)
+			window->fullscreen_handler(window, window->user_data);
 		break;
 	case 2: /* rotate */
 	case 3: /* scale */
@@ -1886,6 +1888,10 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
 		if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
 			window_set_maximized(window,
 					     window->type != TYPE_MAXIMIZED);
+	} else if (sym == XKB_KEY_F11 &&
+		   window->fullscreen_handler &&
+		   state == WL_KEYBOARD_KEY_STATE_PRESSED) {
+		window->fullscreen_handler(window, window->user_data);
 	} else if (window->key_handler) {
 		(*window->key_handler)(window, input, time, key,
 				       sym, state, window->user_data);
@@ -2837,6 +2843,13 @@ window_set_close_handler(struct window *window,
 }
 
 void
+window_set_fullscreen_handler(struct window *window,
+			      window_fullscreen_handler_t handler)
+{
+	window->fullscreen_handler = handler;
+}
+
+void
 window_set_title(struct window *window, const char *title)
 {
 	free(window->title);
diff --git a/clients/window.h b/clients/window.h
index de38647..da18932 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -176,6 +176,7 @@ typedef void (*window_drop_handler_t)(struct window *window,
 				      int32_t x, int32_t y, void *data);
 
 typedef void (*window_close_handler_t)(struct window *window, void *data);
+typedef void (*window_fullscreen_handler_t)(struct window *window, void *data);
 
 typedef void (*widget_resize_handler_t)(struct widget *widget,
 					int32_t width, int32_t height,
@@ -303,6 +304,9 @@ window_set_drop_handler(struct window *window,
 void
 window_set_close_handler(struct window *window,
 			 window_close_handler_t handler);
+void
+window_set_fullscreen_handler(struct window *window,
+			      window_fullscreen_handler_t handler);
 
 void
 window_set_title(struct window *window, const char *title);

commit 0fd49aa8862a3c634ee6a14da139b4e5d620c605
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 21:32:46 2012 -0400

    dnd: Clip flowers to window content area
    
    https://bugs.freedesktop.org/show_bug.cgi?id=52420

diff --git a/clients/dnd.c b/clients/dnd.c
index c38b94f..6f55e95 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -186,6 +186,9 @@ dnd_redraw_handler(struct widget *widget, void *data)
 	cairo_set_source_rgba(cr, 0, 0, 0, 0.8);
 	cairo_fill(cr);
 
+	cairo_rectangle(cr, allocation.x, allocation.y,
+			allocation.width, allocation.height);
+	cairo_clip(cr);
 	cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
 	for (i = 0; i < ARRAY_LENGTH(dnd->items); i++) {
 		if (!dnd->items[i])

commit 72b0f8f2ecbec57ef8755755dd48ba41a8614e95
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 20:54:42 2012 -0400

    Update src/weston-egl-ext.h

diff --git a/src/weston-egl-ext.h b/src/weston-egl-ext.h
index 100b9f1..8e132c0 100644
--- a/src/weston-egl-ext.h
+++ b/src/weston-egl-ext.h
@@ -33,16 +33,12 @@
 #ifndef EGL_WL_bind_wayland_display
 #define EGL_WL_bind_wayland_display 1
 
-#define EGL_WAYLAND_BUFFER_WL			0x31D5 /* eglCreateImageKHR target */
-#define EGL_WAYLAND_PLANE_WL			0x31D6 /* eglCreateImageKHR target */
+#define EGL_WAYLAND_BUFFER_WL		0x31D5 /* eglCreateImageKHR target */
+#define EGL_WAYLAND_PLANE_WL		0x31D6 /* eglCreateImageKHR target */
 
-#define EGL_WAYLAND_BUFFER_COMPONENTS_WL	0x31D7 /* eglQueryWaylandBufferWL attribute */
-
-#define EGL_WAYLAND_BUFFER_RGB_WL	0x31D8
-#define EGL_WAYLAND_BUFFER_RGBA_WL	0x31D9
-#define EGL_WAYLAND_BUFFER_Y_U_V_WL	0x31Da
-#define EGL_WAYLAND_BUFFER_Y_UV_WL	0x31Db
-#define EGL_WAYLAND_BUFFER_Y_XUXV_WL	0x31Dc
+#define EGL_TEXTURE_Y_U_V_WL            0x31D7
+#define EGL_TEXTURE_Y_UV_WL             0x31D8
+#define EGL_TEXTURE_Y_XUXV_WL           0x31D9
 
 struct wl_display;
 struct wl_buffer;

commit 9d01a3e548f1aefffa49990b0199a0b2c453440f
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Mon Jul 23 19:54:59 2012 +0100

    evdev: Release weston_seat with underlying evdev device
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/evdev.c b/src/evdev.c
index 74662b2..62f1bc1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -774,7 +774,7 @@ evdev_input_destroy(struct weston_seat *seat_base)
 	evdev_remove_devices(seat_base);
 	evdev_disable_udev_monitor(&seat->base);
 
-	wl_list_remove(&seat->base.link);
+	weston_seat_release(seat_base);
 	free(seat->seat_id);
 	free(seat);
 }

commit 816c98edb024dea53ac14487f12d76999504c496
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Mon Jul 23 19:54:58 2012 +0100

    Fix memory leak on compositor exit
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/compositor.c b/src/compositor.c
index 3f2828e..ed887a4 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3288,6 +3288,8 @@ weston_compositor_shutdown(struct weston_compositor *ec)
 	wl_array_release(&ec->indices);
 
 	wl_event_loop_destroy(ec->input_loop);
+
+	pixman_region32_fini(&ec->damage);
 }
 
 static int on_term_signal(int signal_number, void *data)

commit 53b6b04685a39a7dbd8d3d1b8a282d6d069ebd33
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Mon Jul 23 19:54:57 2012 +0100

    evdev: Don't ignore multitouch touchscreens
    
    Most touchscreen drivers provide ABS_X and BTN_TOUCH for legacy
    single-touch emulation modes, but this isn't mandatory.  Make sure we
    don't ignore touchscreens with provide multitouch events with the new
    API only.
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/evdev.c b/src/evdev.c
index 3355192..74662b2 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -441,7 +441,7 @@ evdev_configure_device(struct evdev_input_device *device)
 	/* This rule tries to catch accelerometer devices and opt out. We may
 	 * want to adjust the protocol later adding a proper event for dealing
 	 * with accelerometers and implement here accordingly */
-	if (has_abs && !has_key)
+	if (has_abs && !has_key && !device->is_mt)
 		return -1;
 
 	if ((device->caps &

commit 2327d1f490a5362e6b6199ca68b14d11e2f13408
Author: Scott Moreau <oreaus@gmail.com>
Date:   Mon Jul 23 11:53:18 2012 -0600

    wcap: Fix typo in usage output.

diff --git a/wcap/main.c b/wcap/main.c
index 3b671b0..9493304 100644
--- a/wcap/main.c
+++ b/wcap/main.c
@@ -154,7 +154,7 @@ usage(int exit_code)
 		"[--help] [--yuv4mpeg2] [--frame=<frame>] [--all] \n"
 		"\t[--rate=<num:denom>] <wcap file>\n\n"
 		"\t--help\t\t\tthis help text\n"
-		"\t--yuv2mpeg4\t\tdump wcap file to stdout in yuv4mpeg format\n"
+		"\t--yuv4mpeg2\t\tdump wcap file to stdout in yuv4mpeg2 format\n"
 		"\t--frame=<frame>\t\twrite out the given frame number as png\n"
 		"\t--all\t\t\twrite all frames as pngs\n"
 		"\t--rate=<num:denom>\treplay frame rate for yuv4mpeg2,\n"

commit f32f096cd81ed472bac48354d916724e2e2329f8
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 11:10:20 2012 -0400

    wcap: Clarify help message, don't dump yuv4mpeg2 to terminal

diff --git a/wcap/main.c b/wcap/main.c
index 466030e..3b671b0 100644
--- a/wcap/main.c
+++ b/wcap/main.c
@@ -150,11 +150,11 @@ output_yuv_frame(struct wcap_decoder *decoder)
 static void
 usage(int exit_code)
 {
-	fprintf(stderr, "usage: wcap-snapshot "
+	fprintf(stderr, "usage: wcap-decode "
 		"[--help] [--yuv4mpeg2] [--frame=<frame>] [--all] \n"
 		"\t[--rate=<num:denom>] <wcap file>\n\n"
 		"\t--help\t\t\tthis help text\n"
-		"\t--yuv2mpeg4\t\tdump wcap file in yuv4mpeg format\n"
+		"\t--yuv2mpeg4\t\tdump wcap file to stdout in yuv4mpeg format\n"
 		"\t--frame=<frame>\t\twrite out the given frame number as png\n"
 		"\t--all\t\t\twrite all frames as pngs\n"
 		"\t--rate=<num:denom>\treplay frame rate for yuv4mpeg2,\n"
@@ -205,6 +205,15 @@ int main(int argc, char *argv[])
 
 	decoder = wcap_decoder_create(argv[1]);
 
+	if (yuv4mpeg2 && isatty(1)) {
+		fprintf(stderr, "Not dumping yuv4mpeg2 data to terminal.  Pipe output to a file or a process.\n");
+		fprintf(stderr, "For example, to encode to webm, use something like\n\n");
+		fprintf(stderr, "\t$ wcap-decode  --yuv4mpeg2 ../capture.wcap |\n"
+			"\t\tvpxenc --target-bitrate=1024 --best -t 4 -o foo.webm -\n\n");
+
+		exit(EXIT_FAILURE);
+	}
+
 	if (yuv4mpeg2) {
 		printf("YUV4MPEG2 C420jpeg W%d H%d F%d:%d Ip A0:0\n",
 		       decoder->width, decoder->height, num, denom);

commit ec116022ecb4f26ed1629dfe3ad0341f38f45ac5
Author: Scott Moreau <oreaus@gmail.com>
Date:   Sun Jul 22 18:23:52 2012 -0600

    desktop-shell: Declare grab_cursor as enum cursor_type.

diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index cf28246..61599c3 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -53,7 +53,7 @@ struct desktop {
 	struct window *grab_window;
 	struct widget *grab_widget;
 
-	enum desktop_shell_cursor grab_cursor;
+	enum cursor_type grab_cursor;
 };
 
 struct surface {

commit 776a5637028e158e9b90ae7fdedb47138a9a529a
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jul 23 10:47:34 2012 -0400

    wcap: Add GCC_CFLAGS and fix more compiler warnings

diff --git a/wcap/Makefile.am b/wcap/Makefile.am
index da0ba90..338208e 100644
--- a/wcap/Makefile.am
+++ b/wcap/Makefile.am
@@ -5,5 +5,5 @@ wcap_decode_SOURCES =				\
 	wcap-decode.c				\
 	wcap-decode.h
 
-wcap_decode_CFLAGS = $(WCAP_CFLAGS)
+wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
 wcap_decode_LDADD = $(WCAP_LIBS)
diff --git a/wcap/main.c b/wcap/main.c
index 09e0aa7..466030e 100644
--- a/wcap/main.c
+++ b/wcap/main.c
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include <assert.h>
 
 #include <cairo.h>
 
@@ -65,6 +66,8 @@ rgb_to_yuv(uint32_t format, uint32_t p, int *u, int *v)
 		g = (p >> 8) & 0xff;
 		b = (p >> 16) & 0xff;
 		break;
+	default:
+		assert(0);
 	}
 
 	y = (19595 * r + 38469 * g + 7472 * b) >> 16;
diff --git a/wcap/wcap-decode.c b/wcap/wcap-decode.c
index 3dc7e6d..f7cabe3 100644
--- a/wcap/wcap-decode.c
+++ b/wcap/wcap-decode.c
@@ -85,9 +85,7 @@ wcap_decoder_get_frame(struct wcap_decoder *decoder)
 {
 	struct wcap_rectangle *rects;
 	struct wcap_frame_header *header;
-	uint32_t *s;
 	uint32_t i;
-	int width, height;
 
 	if (decoder->p == decoder->end)
 		return 0;
@@ -98,11 +96,8 @@ wcap_decoder_get_frame(struct wcap_decoder *decoder)
 
 	rects = (void *) (header + 1);
 	decoder->p = (uint32_t *) (rects + header->nrects);
-	for (i = 0; i < header->nrects; i++) {
-		width = rects[i].x2 - rects[i].x1;
-		height = rects[i].y2 - rects[i].y1;
+	for (i = 0; i < header->nrects; i++)
 		wcap_decoder_decode_rectangle(decoder, &rects[i]);
-	}
 
 	return 1;
 }

commit 005d8cd9f7e99cc87dfde63016fdbccd54dfa660
Author: Scott Moreau <oreaus@gmail.com>
Date:   Sun Jul 22 18:23:51 2012 -0600

    wcap: Declare variable with same sign as convert_to_yv12() expects.

diff --git a/wcap/main.c b/wcap/main.c
index bdbc8cb..09e0aa7 100644
--- a/wcap/main.c
+++ b/wcap/main.c
@@ -132,7 +132,7 @@ convert_to_yv12(struct wcap_decoder *decoder, unsigned char *out)
 static void
 output_yuv_frame(struct wcap_decoder *decoder)
 {
-	static char *out;
+	static unsigned char *out;
 	int size;
 
 	size = decoder->width * decoder->height * 3 / 2;

commit 0e696478a9c498594dd285883cb3b8e8522f9640
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Sun Jul 22 15:49:57 2012 -0400

    Handle new transform argument in wl_output.geometry event

diff --git a/clients/screenshot.c b/clients/screenshot.c
index 894c4aa..7395bf3 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -62,7 +62,8 @@ display_handle_geometry(void *data,
 			int physical_height,
 			int subpixel,
 			const char *make,
-			const char *model)
+			const char *model,
+			int transform)
 {
 	struct screenshooter_output *output;
 
diff --git a/clients/window.c b/clients/window.c
index ddad36e..d374ab9 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -3194,7 +3194,8 @@ display_handle_geometry(void *data,
 			int physical_height,
 			int subpixel,
 			const char *make,
-			const char *model)
+			const char *model,
+			int transform)
 {
 	struct output *output = data;
 
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index a0397ad..ee3def1 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -497,7 +497,8 @@ display_handle_geometry(void *data,
 			int physical_height,
 			int subpixel,
 			const char *make,
-			const char *model)
+			const char *model,
+			int transform)
 {
 	struct wayland_compositor *c = data;
 
diff --git a/src/compositor.c b/src/compositor.c
index d29df6a..3f2828e 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2781,7 +2781,8 @@ bind_output(struct wl_client *client,
 				output->mm_width,
 				output->mm_height,
 				output->subpixel,
-				output->make, output->model);
+				output->make, output->model,
+				WL_OUTPUT_TRANSFORM_NORMAL);
 
 	wl_list_for_each (mode, &output->mode_list, link) {
 		wl_output_send_mode(resource,

commit c4063f310a35ec1fd51b039243caf5363dfb54f5
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Sun Jul 22 15:32:45 2012 -0400

    xwm: Make override-redirect windows opaque

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 64290ec..e67cac1 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -742,7 +742,17 @@ weston_wm_window_schedule_repaint(struct weston_wm_window *window)
 {
 	struct weston_wm *wm = window->wm;
 
-	if (window->frame_id == XCB_WINDOW_NONE || window->repaint_source)
+	if (window->frame_id == XCB_WINDOW_NONE) {
+		if (window->surface != NULL) {
+			window->surface->opaque_rect[0] = 0.0;
+			window->surface->opaque_rect[1] = 1.0;
+			window->surface->opaque_rect[2] = 0.0;
+			window->surface->opaque_rect[3] = 1.0;
+		}
+		return;
+	}
+
+	if (window->repaint_source)
 		return;
 
 	window->repaint_source =

commit ce1baa80977c9c5cad4226a7cee0fa5129686e89
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Fri Jul 20 23:09:55 2012 +0300

    xwm: use last focused window for guessing transient parent
    
    On X the global absolute coordinates are sent in ConfigureNotify and transient
    windows are mapped exactly on that position. On Wayland we don't have the
    concept of global coordinates, and that's a problem for transient surfaces
    without transient_for set because they rely on such hint for setting their
    positioning.
    
    So this solution is a workaround. It guesses a parent based on the last
    focused window to determine the relative position of the transient surface.
    This put transient windows of Chrome browser back to work.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 405244b..64290ec 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -511,6 +511,8 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
 	if (wm->focus_window)
 		weston_wm_window_schedule_repaint(wm->focus_window);
 	wm->focus_window = window;
+	if (window)
+		wm->focus_latest = window;
 	if (wm->focus_window)
 		weston_wm_window_schedule_repaint(wm->focus_window);
 }
@@ -1562,7 +1564,7 @@ xserver_map_shell_surface(struct weston_wm *wm,
 		&wm->server->compositor->shell_interface;
 	struct weston_wm_window *parent;
 	struct theme *t = window->wm->theme;
-	int x = 0, y = 0;
+	int parent_id, x = 0, y = 0;
 
 	if (!shell_interface->create_shell_surface)
 		return;
@@ -1573,12 +1575,20 @@ xserver_map_shell_surface(struct weston_wm *wm,
 						      &shell_client);
 
 	/* ICCCM 4.1.1 */
-	if (!window->override_redirect || !window->transient_for) {
+	if (!window->override_redirect) {
 		shell_interface->set_toplevel(window->shsurf);
 		return;
 	}
 
-	parent = hash_table_lookup(wm->window_hash, window->transient_for->id);
+	/* not all non-toplevel has transient_for set. So we need this
+	 * workaround to guess a parent that will determine the relative
+	 * position of the transient surface */
+	if (!window->transient_for)
+		parent_id = wm->focus_latest->id;
+	else
+		parent_id = window->transient_for->id;
+
+	parent = hash_table_lookup(wm->window_hash, parent_id);
 
 	/* non-decorated and non-toplevel windows, e.g. sub-menus */
 	if (!parent->decorate && parent->override_redirect) {
diff --git a/src/xwayland/xwayland.h b/src/xwayland/xwayland.h
index 7e1ea45..23c6a77 100644
--- a/src/xwayland/xwayland.h
+++ b/src/xwayland/xwayland.h
@@ -57,6 +57,7 @@ struct weston_wm {
 	struct weston_xserver *server;
 	xcb_window_t wm_window;
 	struct weston_wm_window *focus_window;
+	struct weston_wm_window *focus_latest;
 	struct theme *theme;
 	xcb_cursor_t *cursors;
 	int last_cursor;

commit e66fcee4359a5f60bdcf6a79c119ac114dc607d1
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Fri Jul 20 23:09:54 2012 +0300

    xwm: Fix transient positioning
    
    Commit eaee7841 took out the configure positioning of windows. This patch
    brings it back and addresses also logic for resizing and sub-menus, that was
    not covered on that commit.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index e81a229..405244b 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -459,6 +459,7 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
 	xcb_configure_notify_event_t *configure_notify = 
 		(xcb_configure_notify_event_t *) event;
 	struct weston_wm_window *window;
+	int x, y;
 
 	window = hash_table_lookup(wm->window_hash, configure_notify->window);
 
@@ -467,6 +468,14 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
 		configure_notify->window,
 		configure_notify->x, configure_notify->y,
 		configure_notify->width, configure_notify->height);
+
+	/* resize falls here */
+	if (configure_notify->window != window->id)
+		return;
+
+	weston_wm_window_get_child_position(window, &x, &y);
+	window->x = configure_notify->x - x;
+	window->y = configure_notify->y - y;
 }
 
 static void
@@ -1553,6 +1562,7 @@ xserver_map_shell_surface(struct weston_wm *wm,
 		&wm->server->compositor->shell_interface;
 	struct weston_wm_window *parent;
 	struct theme *t = window->wm->theme;
+	int x = 0, y = 0;
 
 	if (!shell_interface->create_shell_surface)
 		return;
@@ -1569,9 +1579,16 @@ xserver_map_shell_surface(struct weston_wm *wm,
 	}
 
 	parent = hash_table_lookup(wm->window_hash, window->transient_for->id);
+
+	/* non-decorated and non-toplevel windows, e.g. sub-menus */
+	if (!parent->decorate && parent->override_redirect) {
+		x = parent->x + t->margin;
+		y = parent->y + t->margin;
+	}
+
 	shell_interface->set_transient(window->shsurf, parent->surface,
-				       window->x - parent->x + t->margin + t->width,
-				       window->y - parent->y + t->margin + t->titlebar_height,
+				       window->x + t->margin - x,
+				       window->y + t->margin - y,
 				       WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
 }
 

commit 2ea74d9f71f9a2597185127879a7e5b42eb4b164
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Fri Jul 20 23:09:53 2012 +0300

    xwm: Initialize window decoration always as !override
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index e2e2ba3..e81a229 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -324,7 +324,7 @@ weston_wm_window_read_properties(struct weston_wm_window *window)
 					     props[i].atom,
 					     XCB_ATOM_ANY, 0, 2048);
 
-	window->decorate = 1;
+	window->decorate = !window->override_redirect;
 	for (i = 0; i < ARRAY_LENGTH(props); i++)  {
 		reply = xcb_get_property_reply(wm->conn, cookie[i], NULL);
 		if (!reply)

commit b67ea54a3fb721b042083d47f94cb2b2cd6fa1c0
Author: Scott Moreau <oreaus@gmail.com>
Date:   Thu Jul 19 00:49:06 2012 -0600

    weston.ini: Move binding-modifier to shell section.
    
    The variable has no effect as part of the screensaver section.

diff --git a/weston.ini b/weston.ini
index f0736df..3c98e48 100644
--- a/weston.ini
+++ b/weston.ini
@@ -5,6 +5,7 @@ background-color=0xff002244
 panel-color=0x90ff0000
 locking=true
 animation=zoom
+#binding-modifier=ctrl
 
 #type=tablet-shell.so
 #lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
@@ -31,4 +32,3 @@ path=./clients/flower
 # Uncomment path to disable screensaver
 path=/usr/libexec/weston-screensaver
 duration=600
-#binding-modifier=ctrl

commit f25602bdc0e224d74143c35e2b54f3d6d142d2e2
Author: Philipp Brüschweiler <blei42@gmail.com>
Date:   Wed Jul 11 22:25:31 2012 +0200

    Extract the text_model_manager interface from input_method
    
    This is necessary because all clients need a way to create
    text_models, but only one client at a time can be bound to
    the input_method global (else we don't know to whom we are
    supposed to send events).

diff --git a/clients/editor.c b/clients/editor.c
index 9498d53..19f7073 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -40,7 +40,7 @@ struct text_entry {
 };
 
 struct editor {
-	struct input_method *input_method;
+	struct text_model_manager *text_model_manager;
 	struct display *display;
 	struct window *window;
 	struct widget *widget;
@@ -86,7 +86,7 @@ text_entry_create(struct editor *editor, const char *text)
 	entry->widget = editor->widget;
 	entry->text = strdup(text);
 	entry->active = 0;
-	entry->model = input_method_create_text_model(editor->input_method, surface);
+	entry->model = text_model_manager_create_text_model(editor->text_model_manager, surface);
 	text_model_add_listener(entry->model, &text_model_listener, entry);
 
 	return entry;
@@ -267,8 +267,9 @@ global_handler(struct wl_display *display, uint32_t id,
 {
 	struct editor *editor = data;
 
-	if (!strcmp(interface, "input_method")) {
-		editor->input_method = wl_display_bind(display, id, &input_method_interface);
+	if (!strcmp(interface, "text_model_manager")) {
+		editor->text_model_manager = wl_display_bind(display, id,
+							     &text_model_manager_interface);
 	}
 }
 
diff --git a/protocol/text.xml b/protocol/text.xml
index d22156c..a14277a 100644
--- a/protocol/text.xml
+++ b/protocol/text.xml
@@ -36,12 +36,14 @@
     <event name="locale"/>      
   </interface>
 
-  <interface name="input_method" version="1">
+  <interface name="text_model_manager" version="1">
     <request name="create_text_model">
       <arg name="id" type="new_id" interface="text_model"/>
       <arg name="surface" type="object" interface="wl_surface"/>
     </request>
+  </interface>
 
+  <interface name="input_method" version="1">
     <request name="commit_string">
       <arg name="text" type="string"/>
       <arg name="index" type="uint"/>
diff --git a/src/text-backend.c b/src/text-backend.c
index 1eb49f1..353a983 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -36,12 +36,13 @@ struct text_model {
 };
 
 struct input_method {
-	struct wl_object base;
-	struct weston_compositor *ec;
-	struct wl_global *global;
+	struct wl_resource *input_method_binding;
+	struct wl_global *input_method_global;
+	struct wl_global *text_model_manager_global;
 	struct wl_listener destroy_listener;
-	struct wl_list models;
 


Reply to: