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

weston: Changes to 'upstream-unstable'



 clients/Makefile.am         |   46 ++++++++++++++++++++++----------------------
 clients/screenshot.c        |    7 ++++++
 clients/terminal.c          |    9 ++++++++
 clients/window.c            |    8 +++++--
 configure.ac                |    4 +--
 man/weston.man              |    5 +++-
 shared/Makefile.am          |    1 
 shared/cairo-util.c         |    3 +-
 shared/cairo-util.h         |    4 ---
 shared/image-loader.c       |    2 -
 shared/image-loader.h       |   31 +++++++++++++++++++++++++++++
 src/compositor-wayland.c    |    2 -
 src/compositor-x11.c        |    2 -
 src/compositor.c            |   10 ++++++++-
 src/launcher-util.c         |    2 -
 src/shell.c                 |    7 ++++++
 src/weston-launch.c         |   12 +++++------
 tests/surface-global-test.c |    2 -
 18 files changed, 112 insertions(+), 45 deletions(-)

New commits:
commit 9ceb471a15f39b9a1619afb51f6c90c26819297d
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 24 20:32:30 2013 -0500

    configure.ac: Bump version to 1.0.5

diff --git a/configure.ac b/configure.ac
index 1826531..8a9c291 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_PREREQ([2.64])
 AC_INIT([weston],
-        [1.0.4],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.0.4],
+        [1.0.5],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.0.5],
         [weston],
         [http://wayland.freedesktop.org/])
 

commit 5f68322dd22de840fe7bdf29617cd1f9427f25ce
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Feb 14 16:31:42 2013 -0500

    window.c: Don't allow moving a maximized window
    
    Ideally the shell would send an unmaximize event to the client when
    we try to move a maximized window, but for now, let's just prevent
    moving maximized windows.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=56296

diff --git a/clients/window.c b/clients/window.c
index 3d23b3a..5dbd992 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1721,6 +1721,9 @@ frame_get_pointer_image_for_location(struct frame *frame, struct input *input)
 	struct window *window = frame->widget->window;
 	int location;
 
+	if (window->type != TYPE_TOPLEVEL)
+		return CURSOR_LEFT_PTR;
+
 	location = theme_get_location(t, input->sx, input->sy,
 				      frame->widget->allocation.width,
 				      frame->widget->allocation.height,
@@ -1836,6 +1839,9 @@ frame_button_handler(struct widget *widget,
 	struct display *display = window->display;
 	int location;
 
+	if (window->type != TYPE_TOPLEVEL)
+		return;
+
 	location = theme_get_location(display->theme, input->sx, input->sy,
 				      frame->widget->allocation.width,
 				      frame->widget->allocation.height,

commit fd5654baae575bb9dab60641b3d547368ab1c267
Author: Rob Bradford <rob@linux.intel.com>
Date:   Tue Feb 12 11:53:47 2013 +0000

    shell: Bypass fullscreen scaling if surface width and height match output
    
    If our surface has width and height set to the same dimensions as the output
    then we can bypassing the scale factor calculation and addition of the
    transformation.
    
    The use case that led to this optimisation is the playback of video using
    gstreamer-vaapi with the "scale" method. The video is the same dimensions as
    the output (1080p.)

diff --git a/src/shell.c b/src/shell.c
index f8cee0e..831b125 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1672,6 +1672,13 @@ shell_configure_fullscreen(struct shell_surface *shsurf)
 			center_on_output(surface, shsurf->fullscreen_output);
 		break;
 	case WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE:
+		/* 1:1 mapping between surface and output dimensions */
+		if (output->width == surface->geometry.width &&
+		    output->height == surface->geometry.height) {
+			weston_surface_set_position(surface, output->x, output->y);
+			break;
+		}
+
 		matrix = &shsurf->fullscreen.transform.matrix;
 		weston_matrix_init(matrix);
 

commit 9fc4c3c98b1cb49566365bdbd3c69d356b353b64
Author: Martin Andersson <g02maran@gmail.com>
Date:   Wed Feb 13 00:11:12 2013 +0100

    weston-launcher: Add missing newline in error message

diff --git a/src/launcher-util.c b/src/launcher-util.c
index b4b82f1..9196e4f 100644
--- a/src/launcher-util.c
+++ b/src/launcher-util.c
@@ -96,7 +96,7 @@ weston_launcher_open(struct weston_compositor *compositor,
 
 	data = (union cmsg_data *) CMSG_DATA(cmsg);
 	if (data->fd == -1) {
-		fprintf(stderr, "missing drm fd in socket request");
+		fprintf(stderr, "missing drm fd in socket request\n");
 		return -1;
 	}
 

commit 13f65f167be90f8d21331bb5190d452693f1289e
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Feb 14 12:09:41 2013 -0500

    configure.ac: Add version to bug URL as well

diff --git a/configure.ac b/configure.ac
index a1d82be..1826531 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_PREREQ([2.64])
 AC_INIT([weston],
         [1.0.4],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.0.4],
         [weston],
         [http://wayland.freedesktop.org/])
 

commit 435a8f0fc9520620c01122f93e8352bdc8c443bb
Author: Scott Moreau <oreaus@gmail.com>
Date:   Wed Feb 13 14:29:35 2013 -0700

    configure.ac: Change bugs.freedesktop.org product to Wayland
    
    Update the bug link. Thanks to Rune K. Svendsen for spotting this.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=60818
    
    Conflicts:
    	configure.ac

diff --git a/configure.ac b/configure.ac
index 120185b..a1d82be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_PREREQ([2.64])
 AC_INIT([weston],
         [1.0.4],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=weston],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston],
         [weston],
         [http://wayland.freedesktop.org/])
 

commit 48a9160426f305ce1593b271f2cbcf3ab68d5462
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Wed Feb 13 16:06:37 2013 +0200

    compositor: Init fade surface color properly
    
    When fading in, if a repaint was triggered after a call to
    weston_compositor_fade() but before the first call to fade_frame(),
    the fade surface wouldn't be drawn because its alpha channel wasn't
    initialized properly.

diff --git a/src/compositor.c b/src/compositor.c
index c2e5387..bb129d6 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1112,7 +1112,7 @@ weston_compositor_fade(struct weston_compositor *compositor, float tint)
 			return;
 
 		weston_surface_configure(surface, 0, 0, 8192, 8192);
-		weston_surface_set_color(surface, 0.0, 0.0, 0.0, 0.0);
+		weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1.0 - tint);
 		wl_list_insert(&compositor->fade_layer.surface_list,
 			       &surface->layer_link);
 		weston_surface_update_transform(surface);

commit c4831be22d801ce34d478b731dd1100d7db78fb5
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Feb 13 13:40:58 2013 -0500

    screenshot: Print warning if we're not launched from weston
    
    weston-screenshooter is a helper binary that weston launches to write the
    screenshot to disk.  If somebody tries to launch it by hand, print a
    warning and mention the screenshot keybinding.

diff --git a/clients/screenshot.c b/clients/screenshot.c
index 8681a41..c218554 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -241,6 +241,13 @@ int main(int argc, char *argv[])
 	struct screenshooter_output *output;
 	int width, height;
 
+	if (getenv("WAYLAND_SOCKET") == NULL) {
+		fprintf(stderr, "%s is must be launched by weston.\n"
+			"Use the MOD+S shortcut to take a screenshot.",
+			argv[0]);
+		return -1;
+	}
+
 	display = wl_display_connect(NULL);
 	if (display == NULL) {
 		fprintf(stderr, "failed to create display: %m\n");

commit 033b5df52f41cb330e534b349f9ee2c12cef9522
Author: U. Artie Eoff <ullysses.a.eoff@intel.com>
Date:   Tue Jan 29 15:30:09 2013 -0800

    tests: fix assignment typo, should be comparison
    
    Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>

diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c
index dbb8c8d..5908f60 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -55,7 +55,7 @@ surface_to_from_global(void *data)
 
 	weston_surface_from_global_fixed(surface, wl_fixed_from_int(21),
 					 wl_fixed_from_int(100), &fx, &fy);
-	assert(fx = wl_fixed_from_int(16) && fy == wl_fixed_from_int(90));
+	assert(fx == wl_fixed_from_int(16) && fy == wl_fixed_from_int(90));
 
 	weston_surface_from_global(surface, 0, 0, &ix, &iy);
 	assert(ix == -5 && iy == -10);

commit 8877173f0ca73b2b454c2eb228374b59e5d544ab
Author: Scott Moreau <oreaus@gmail.com>
Date:   Wed Aug 29 15:15:58 2012 -0600

    Add --version option

diff --git a/man/weston.man b/man/weston.man
index 4523ceb..a6aa9cb 100644
--- a/man/weston.man
+++ b/man/weston.man
@@ -104,8 +104,11 @@ or you can pass an absolute path. The default backend is
 unless the environment suggests otherwise, see
 .IR DISPLAY " and " WAYLAND_DISPLAY .
 .TP
+.BR \-\-version
+Print the program version.
+.TP
 .BR \-\^h ", " \-\-help
-Print the program version and a summary of command line options, and quit.
+Print a summary of command line options, and quit.
 .TP
 \fB\-\^i\fR\fIN\fR, \fB\-\-idle\-time\fR=\fIN\fR
 Set the idle timeout to
diff --git a/src/compositor.c b/src/compositor.c
index bab6c82..c2e5387 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3049,6 +3049,7 @@ usage(int error_code)
 
 
 		"Core options:\n\n"
+		"  --version\t\tPrint weston version\n"
 		"  -B, --backend=MODULE\tBackend module, one of drm-backend.so,\n"
 		"\t\t\t\tx11-backend.so or wayland-backend.so\n"
 		"  -S, --socket=NAME\tName of socket to listen on\n"
@@ -3099,6 +3100,7 @@ int main(int argc, char *argv[])
 	int32_t idle_time = 300;
 	int32_t help = 0;
 	char *socket_name = "wayland-0";
+	int32_t version = 0;
 	char *config_file;
 
 	const struct config_key core_config_keys[] = {
@@ -3117,6 +3119,7 @@ int main(int argc, char *argv[])
 		{ WESTON_OPTION_STRING, "modules", 0, &option_modules },
 		{ WESTON_OPTION_STRING, "log", 0, &log },
 		{ WESTON_OPTION_BOOLEAN, "help", 'h', &help },
+		{ WESTON_OPTION_BOOLEAN, "version", 0, &version },
 	};
 
 	argc = parse_options(core_options,
@@ -3125,6 +3128,11 @@ int main(int argc, char *argv[])
 	if (help)
 		usage(EXIT_SUCCESS);
 
+	if (version) {
+		printf(PACKAGE_STRING "\n");
+		return EXIT_SUCCESS;
+	}
+
 	weston_log_file_open(log);
 	
 	weston_log("%s\n"

commit b65a207388840eb51d1cd74aaba9863c4423d21c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue Jan 29 14:14:06 2013 -0500

    weston-launch: Clear environment and set it up from scratch
    
    With recent systemd[1] XDG_VTNR will leak through to pam, which ends up
    setting a vtnr pam argument with the wrong value.  The fix is to clear
    XDG_VTNR first, but what we should have been doing all along is resetting
    the environment.
    
    Thanks to Ray Strode for helping debug this.
    
    [1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=a8573ccc35a4efe8900be5d48c6c803670540c2b

diff --git a/src/weston-launch.c b/src/weston-launch.c
index 583e85a..bc7f8a2 100644
--- a/src/weston-launch.c
+++ b/src/weston-launch.c
@@ -556,6 +556,12 @@ main(int argc, char *argv[])
 	if (wl.pw == NULL)
 		error(1, errno, "failed to get username");
 
+	clearenv();
+	setenv("USER", wl.pw->pw_name, 1);
+	setenv("LOGNAME", wl.pw->pw_name, 1);
+	setenv("HOME", wl.pw->pw_dir, 1);
+	setenv("SHELL", wl.pw->pw_shell, 1);
+
 	if (!weston_launch_allowed(&wl))
 		error(1, 0, "Permission denied. You should either:\n"
 #ifdef HAVE_SYSTEMD_LOGIN
@@ -605,12 +611,6 @@ main(int argc, char *argv[])
 			sleep(sleep_fork);
 		}
 
-		if (new_user) {
-			setenv("USER", wl.pw->pw_name, 1);
-			setenv("LOGNAME", wl.pw->pw_name, 1);
-			setenv("HOME", wl.pw->pw_dir, 1);
-			setenv("SHELL", wl.pw->pw_shell, 1);
-		}
 		env = pam_getenvlist(wl.ph);
 		if (env) {
 			for (i = 0; env[i]; ++i) {

commit cdfc4c2d45b48ab12c243bb7f011f1244b3b0a83
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jan 28 16:03:51 2013 -0500

    toytoolkit: Remove left-over pixman dependency
    
    toytoolkit doesn't use pixman.  Remove the pixman.h include and the
    LDADD.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=57812

diff --git a/clients/Makefile.am b/clients/Makefile.am
index 18af2c0..621c7c3 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -82,7 +82,6 @@ libtoytoolkit_la_SOURCES =			\
 	workspaces-client-protocol.h
 
 libtoytoolkit_la_LIBADD =			\
-	$(PIXMAN_LIBS)				\
 	$(CLIENT_LIBS)				\
 	$(CAIRO_EGL_LIBS)			\
 	../shared/libshared-cairo.la -lrt -lm
@@ -104,7 +103,7 @@ image_LDADD = libtoytoolkit.la
 
 cliptest_SOURCES = cliptest.c
 cliptest_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAN_CFLAGS)
-cliptest_LDADD = libtoytoolkit.la
+cliptest_LDADD = libtoytoolkit.la $(PIXMAN_LIBS)
 
 dnd_SOURCES = dnd.c
 dnd_LDADD = libtoytoolkit.la
diff --git a/clients/window.c b/clients/window.c
index b7abfc8..3d23b3a 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -39,8 +39,6 @@
 #include <sys/epoll.h>
 #include <sys/timerfd.h>
 
-#include <pixman.h>
-
 #ifdef HAVE_CAIRO_EGL
 #include <wayland-egl.h>
 

commit cc7ad840788cbbddfcfb3d0bc2a1ec77fb46d5e8
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jan 28 16:01:22 2013 -0500

    Add new shared/image-loader.h to separate include dependencies
    
    Before, cairo-util.h would combine pixman and cairo includes.  X11 and
    Wayland compositors uses this to load an image as a pixman_image_t but are
    forced to include cairo headers.  Clients use load_cairo_surface to
    load images as cairo_surface_t's, but are forced to include pixman.h.
    
    We move the load_image pixman prototype to its own header, so compositors
    can get at the pixman prototype without including cairo.h and clients
    can include the cairo based function without including pixman.h.
    
    Conflicts:
    	src/compositor-wayland.c

diff --git a/shared/Makefile.am b/shared/Makefile.am
index b38cb95..1b06c89 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -26,5 +26,6 @@ libshared_cairo_la_LIBADD =			\
 libshared_cairo_la_SOURCES =			\
 	$(libshared_la_SOURCES)			\
 	image-loader.c				\
+	image-loader.h				\
 	cairo-util.c				\
 	cairo-util.h
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index 360099e..8b41f41 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -31,7 +31,8 @@
 #include <cairo.h>
 #include "cairo-util.h"
 
-#include "../shared/config-parser.h"
+#include "image-loader.h"
+#include "config-parser.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
diff --git a/shared/cairo-util.h b/shared/cairo-util.h
index 3b93d40..aff4669 100644
--- a/shared/cairo-util.h
+++ b/shared/cairo-util.h
@@ -24,7 +24,6 @@
 #define _CAIRO_UTIL_H
 
 #include <cairo.h>
-#include <pixman.h>
 
 void
 surface_flush_device(cairo_surface_t *surface);
@@ -90,7 +89,4 @@ enum theme_location {
 enum theme_location
 theme_get_location(struct theme *t, int x, int y, int width, int height, int flags);
 
-pixman_image_t *
-load_image(const char *filename);
-
 #endif
diff --git a/shared/image-loader.c b/shared/image-loader.c
index 64ba2ae..c9f15d4 100644
--- a/shared/image-loader.c
+++ b/shared/image-loader.c
@@ -29,7 +29,7 @@
 #include <png.h>
 #include <pixman.h>
 
-#include "cairo-util.h"
+#include "image-loader.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
diff --git a/shared/image-loader.h b/shared/image-loader.h
new file mode 100644
index 0000000..445e651
--- /dev/null
+++ b/shared/image-loader.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _IMAGE_LOADER_H
+#define _IMAGE_LOADER_H
+
+#include <pixman.h>
+
+pixman_image_t *
+load_image(const char *filename);
+
+#endif
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index c675e83..7fe7d5d 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -42,7 +42,7 @@
 #include <EGL/eglext.h>
 
 #include "compositor.h"
-#include "../shared/cairo-util.h"
+#include "../shared/image-loader.h"
 
 struct wayland_compositor {
 	struct weston_compositor	 base;
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index a546263..d1b6ec7 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -50,7 +50,7 @@
 
 #include "compositor.h"
 #include "../shared/config-parser.h"
-#include "../shared/cairo-util.h"
+#include "../shared/image-loader.h"
 
 #define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
 

commit b4ca478afdc80727683ac6c266a1c5d874f66364
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Mon Jan 28 15:35:03 2013 -0500

    clients: Make libtoytoolkit a libtool library
    
    This way libtool will remember the libtoytoolkit LIBADD libraries.
    We can drop the toolkit_libs hack and just link to libtoytoolkit.la and
    libtool will add the dependencies.
    
    Conflicts:
    	clients/Makefile.am

diff --git a/clients/Makefile.am b/clients/Makefile.am
index 0e9ce4a..18af2c0 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -71,9 +71,9 @@ endif
 
 screenshooter = weston-screenshooter
 
-noinst_LIBRARIES = libtoytoolkit.a
+noinst_LTLIBRARIES = libtoytoolkit.la
 
-libtoytoolkit_a_SOURCES =			\
+libtoytoolkit_la_SOURCES =			\
 	window.c				\
 	window.h				\
 	text-cursor-position-protocol.c		\
@@ -81,50 +81,51 @@ libtoytoolkit_a_SOURCES =			\
 	workspaces-protocol.c			\
 	workspaces-client-protocol.h
 
-toolkit_libs =						\
-	libtoytoolkit.a					\
-	../shared/libshared-cairo.la			\
-	$(CLIENT_LIBS) $(CAIRO_EGL_LIBS) -lrt -lm
+libtoytoolkit_la_LIBADD =			\
+	$(PIXMAN_LIBS)				\
+	$(CLIENT_LIBS)				\
+	$(CAIRO_EGL_LIBS)			\
+	../shared/libshared-cairo.la -lrt -lm
 
 flower_SOURCES = flower.c
-flower_LDADD = $(toolkit_libs)
+flower_LDADD = libtoytoolkit.la
 
 weston_screenshooter_SOURCES =			\
 	screenshot.c				\
 	screenshooter-protocol.c		\
 	screenshooter-client-protocol.h
-weston_screenshooter_LDADD = $(toolkit_libs)
+weston_screenshooter_LDADD = libtoytoolkit.la
 
 weston_terminal_SOURCES = terminal.c
-weston_terminal_LDADD = $(toolkit_libs) -lutil
+weston_terminal_LDADD = libtoytoolkit.la -lutil
 
 image_SOURCES = image.c
-image_LDADD = $(toolkit_libs)
+image_LDADD = libtoytoolkit.la
 
 cliptest_SOURCES = cliptest.c
 cliptest_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAN_CFLAGS)
-cliptest_LDADD = $(toolkit_libs) $(PIXMAN_LIBS)
+cliptest_LDADD = libtoytoolkit.la
 
 dnd_SOURCES = dnd.c
-dnd_LDADD = $(toolkit_libs)
+dnd_LDADD = libtoytoolkit.la
 
 smoke_SOURCES = smoke.c
-smoke_LDADD = $(toolkit_libs)
+smoke_LDADD = libtoytoolkit.la
 
 resizor_SOURCES = resizor.c
-resizor_LDADD = $(toolkit_libs)
+resizor_LDADD = libtoytoolkit.la
 
 eventdemo_SOURCES = eventdemo.c
-eventdemo_LDADD = $(toolkit_libs)
+eventdemo_LDADD = libtoytoolkit.la
 
 clickdot_SOURCES = clickdot.c
-clickdot_LDADD = $(toolkit_libs)
+clickdot_LDADD = libtoytoolkit.la
 
 editor_SOURCES = 				\
 	editor.c				\
 	text-protocol.c				\
 	text-client-protocol.h
-editor_LDADD = $(toolkit_libs)
+editor_LDADD = libtoytoolkit.la
 
 keyboard_SOURCES = 				\
 	keyboard.c				\
@@ -132,7 +133,7 @@ keyboard_SOURCES = 				\
 	desktop-shell-protocol.c		\
 	input-method-protocol.c			\
 	input-method-client-protocol.h
-keyboard_LDADD = $(toolkit_libs)
+keyboard_LDADD = libtoytoolkit.la
 
 weston_info_SOURCES =				\
 	weston-info.c				\
@@ -144,13 +145,13 @@ weston_desktop_shell_SOURCES =			\
 	desktop-shell.c				\
 	desktop-shell-client-protocol.h		\
 	desktop-shell-protocol.c
-weston_desktop_shell_LDADD = $(toolkit_libs)
+weston_desktop_shell_LDADD = libtoytoolkit.la
 
 weston_tablet_shell_SOURCES =			\
 	tablet-shell.c				\
 	tablet-shell-client-protocol.h		\
 	tablet-shell-protocol.c
-weston_tablet_shell_LDADD = $(toolkit_libs)
+weston_tablet_shell_LDADD = libtoytoolkit.la
 
 BUILT_SOURCES =					\
 	screenshooter-client-protocol.h		\
@@ -175,7 +176,7 @@ if BUILD_FULL_GL_CLIENTS
 full_gl_client_programs = gears
 
 gears_SOURCES = gears.c
-gears_LDADD = $(toolkit_libs)
+gears_LDADD = libtoytoolkit.la
 
 if HAVE_GLU
 screensaver = weston-screensaver
@@ -188,7 +189,7 @@ weston_screensaver_SOURCES =			\
 	wscreensaver-glue.h			\
 	glmatrix.c				\
 	matrix3.xpm
-weston_screensaver_LDADD = $(toolkit_libs) $(GLU_LIBS)
+weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
 weston_screensaver_CFLAGS = $(GLU_CFLAGS)
 endif
 
@@ -199,6 +200,6 @@ endif
 if HAVE_POPPLER
 poppler_programs = view
 view_SOURCES = view.c
-view_LDADD = $(toolkit_libs) $(POPPLER_LIBS)
+view_LDADD = libtoytoolkit.la $(POPPLER_LIBS)
 view_CPPFLAGS = $(AM_CPPFLAGS) $(POPPLER_CFLAGS)
 endif

commit cf7c5109a587cb635a6ae716b425d42b36f3ad67
Author: Dima Ryazanov <dima@gmail.com>
Date:   Mon Jan 28 01:11:06 2013 -0800

    terminal: Handle the window close event
    
    There may be multiple windows open, so destroy the terminal instead of exiting.
    
    Signed-off-by: Dima Ryazanov <dima@gmail.com>

diff --git a/clients/terminal.c b/clients/terminal.c
index 25acc81..664df5d 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2069,6 +2069,14 @@ fullscreen_handler(struct window *window, void *data)
 	window_set_fullscreen(window, !window_is_fullscreen(terminal->window));
 }
 
+static void
+close_handler(struct window *window, void *data)
+{
+	struct terminal *terminal = data;
+
+	terminal_destroy(terminal);
+}
+
 static int
 handle_bound_key(struct terminal *terminal,
 		 struct input *input, uint32_t sym, uint32_t time)
@@ -2541,6 +2549,7 @@ terminal_create(struct display *display)
 	window_set_keyboard_focus_handler(terminal->window,
 					  keyboard_focus_handler);
 	window_set_fullscreen_handler(terminal->window, fullscreen_handler);
+	window_set_close_handler(terminal->window, close_handler);
 
 	widget_set_redraw_handler(terminal->widget, redraw_handler);
 	widget_set_resize_handler(terminal->widget, resize_handler);


Reply to: