.gitignore | 3 COPYING | 48 Makefile.am | 9 README | 19 clients/.gitignore | 17 clients/Makefile.am | 80 clients/cairo-util.c | 546 ----- clients/cairo-util.h | 46 clients/clickdot.c | 314 +++ clients/desktop-shell.c | 370 +++- clients/dnd.c | 189 +- clients/editor.c | 310 +++ clients/eventdemo.c | 96 - clients/flower.c | 44 clients/gears.c | 82 clients/glmatrix.c | 2 clients/image.c | 158 - clients/keyboard.c | 213 ++ clients/resizor.c | 151 + clients/screenshot.c | 174 + clients/simple-egl.c | 184 +- clients/simple-shm.c | 125 + clients/simple-touch.c | 150 - clients/smoke.c | 13 clients/tablet-shell.c | 362 ++- clients/terminal.c | 623 ++++-- clients/view.c | 46 clients/window.c | 2547 +++++++++++++++++---------- clients/window.h | 112 - clients/wscreensaver.c | 25 clients/wscreensaver.h | 4 configure.ac | 142 + data/Makefile.am | 25 data/border.png |binary data/icon_window.png |binary data/sign_close.png |binary data/sign_maximize.png |binary data/sign_minimize.png |binary debian/changelog | 9 debian/control | 4 debian/watch | 3 dev/null |binary protocol/Makefile.am | 3 protocol/desktop-shell.xml | 100 - protocol/screenshooter.xml | 2 protocol/text-cursor-position.xml | 11 protocol/text.xml | 52 shared/Makefile.am | 17 shared/cairo-util.c | 474 +++++ shared/cairo-util.h | 87 shared/config-parser.c | 2 shared/config-parser.h | 23 shared/image-loader.c | 404 ++++ shared/option-parser.c | 82 shared/os-compatibility.c | 180 + shared/os-compatibility.h | 54 src/.gitignore | 8 src/Makefile.am | 137 + src/android-framebuffer.cpp | 93 + src/android-framebuffer.h | 54 src/clipboard.c | 277 +++ src/compositor-android.c | 462 +++++ src/compositor-drm.c | 1687 ++++++++++++++---- src/compositor-openwfd.c | 134 - src/compositor-wayland.c | 684 +++++-- src/compositor-x11.c | 643 ++++--- src/compositor.c | 3460 ++++++++++++++++++++++++++------------ src/compositor.h | 639 +++++-- src/evdev-private.h | 115 + src/evdev-touchpad.c | 538 +++++ src/evdev.c | 634 ++++-- src/evdev.h | 15 src/filter.c | 336 +++ src/filter.h | 65 src/hash.c | 307 --- src/hash.h | 49 src/image-loader.c | 177 - src/launcher-util.c | 160 + src/launcher-util.h | 35 src/libbacklight.c | 307 +++ src/libbacklight.h | 49 src/log.c | 114 + src/log.h | 35 src/matrix.c | 250 ++ src/matrix.h | 64 src/screenshooter.c | 384 ++++ src/shell.c | 3159 +++++++++++++++++++++++++++------- src/switcher.c | 131 - src/tablet-shell.c | 231 +- src/text-backend.c | 279 +++ src/tty.c | 140 + src/util.c | 489 +++-- src/weston-egl-ext.h | 56 src/weston-launch.c | 644 +++++++ src/weston-launch.h | 46 src/xserver-launcher.c | 1762 ------------------- src/xwayland/Makefile.am | 30 src/xwayland/hash.c | 307 +++ src/xwayland/hash.h | 49 src/xwayland/launcher.c | 379 ++++ src/xwayland/selection.c | 702 +++++++ src/xwayland/window-manager.c | 1648 ++++++++++++++++++ src/xwayland/xwayland.h | 154 + src/zoom.c | 330 +++ tests/.gitignore | 4 tests/Makefile.am | 40 tests/client-test.c | 71 tests/event-test.c | 80 tests/matrix-test.c | 420 ++++ tests/setbacklight.c | 191 ++ tests/surface-test.c | 49 tests/test-client.c | 365 ++++ tests/test-runner.c | 148 + tests/test-runner.h | 42 tests/weston-test | 4 wcap/.gitignore | 3 wcap/Makefile.am | 9 wcap/README | 99 + wcap/main.c | 252 ++ wcap/wcap-decode.c | 149 + wcap/wcap-decode.h | 63 weston-desktop-shell.ini | 26 weston-tablet-shell.ini | 75 weston.ini | 34 124 files changed, 24929 insertions(+), 8379 deletions(-)
New commits: commit 86a43f9d4b0e43688c8e7678203080302461dea9 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 21:46:51 2012 +0300 control: Add missing build-depends: libmtdev-dev, libxcursor-dev, libpam0g-dev, libvpx-dev. diff --git a/debian/changelog b/debian/changelog index 9c2017e..1f48aa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ weston (0.95.0-1) UNRELEASED; urgency=low * New upstream release. * Add a watch file. + * control: Add missing build-depends: libmtdev-dev, libxcursor-dev, + libpam0g-dev, libvpx-dev. -- Timo Aaltonen <tjaal...@ubuntu.com> Thu, 16 Aug 2012 20:52:23 +0300 diff --git a/debian/control b/debian/control index 0bda6ba..0626b78 100644 --- a/debian/control +++ b/debian/control @@ -25,6 +25,10 @@ Build-Depends: libxkbcommon-dev, libcairo2-dev, libgdk-pixbuf2.0-dev, + libxcursor-dev, + libmtdev-dev, + libpam0g-dev, + libvpx-dev, Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-xorg/wayland/weston Vcs-Browser: http://git.debian.org/?p=pkg-xorg/wayland/weston.git commit a66dd36c4f43701784a043eb0589cf728ae4dbf2 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 20:56:19 2012 +0300 Add a watch file. diff --git a/debian/changelog b/debian/changelog index de68de9..9c2017e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ weston (0.95.0-1) UNRELEASED; urgency=low * New upstream release. + * Add a watch file. -- Timo Aaltonen <tjaal...@ubuntu.com> Thu, 16 Aug 2012 20:52:23 +0300 diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..057a2f4 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +#git=git://anongit.freedesktop.org/wayland/weston +version=3 +http://wayland.freedesktop.org/releases/weston-(.*)\.tar\.xz commit c88a048286a52b5e51e953e303ed28c4d9a1f359 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 20:53:45 2012 +0300 update the changelog diff --git a/debian/changelog b/debian/changelog index c4f9834..de68de9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +weston (0.95.0-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Timo Aaltonen <tjaal...@ubuntu.com> Thu, 16 Aug 2012 20:52:23 +0300 + weston (0.85.0-1) experimental; urgency=low * Initial release (Closes: #630809). commit e302b3ef77894cb9fd4113c873a5502efc9a8dd6 Author: Kristian Høgsberg <k...@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 <k...@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 <k...@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 <k...@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 <k...@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 <k...@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 <dan...@fooishbar.org> Date: Mon Jul 23 19:54:59 2012 +0100 evdev: Release weston_seat with underlying evdev device Signed-off-by: Daniel Stone <dan...@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 <dan...@fooishbar.org> Date: Mon Jul 23 19:54:58 2012 +0100 Fix memory leak on compositor exit Signed-off-by: Daniel Stone <dan...@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 <dan...@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 <dan...@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 <ore...@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 <k...@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 <ore...@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 <k...@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 <ore...@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 <k...@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 <k...@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.vigna...@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.vigna...@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) { -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1t2569-0001qo...@vasks.debian.org