Rebased ref, commits from common ancestor: commit 82d19aabc87a3040edb96c0bda0ef27c4edb26b8 Author: Bryce Harrington <br...@osg.samsung.com> Date: Fri Feb 6 18:03:43 2015 -0800
configure.ac bump to version 1.6.93 for the rc2 release. diff --git a/configure.ac b/configure.ac index ec7739d..1db9f79 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [6]) -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]) @@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h]) AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) -COMPOSITOR_MODULES="wayland-server >= 1.6.92 pixman-1 >= 0.25.2" +COMPOSITOR_MODULES="wayland-server >= 1.6.93 pixman-1 >= 0.25.2" AC_ARG_ENABLE(egl, [ --disable-egl],, enable_egl=yes) @@ -292,7 +292,7 @@ AC_SUBST(JPEG_LIBS) PKG_CHECK_MODULES(CAIRO, [cairo]) -PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.92]) +PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.93]) AC_ARG_ENABLE(simple-clients, AS_HELP_STRING([--disable-simple-clients], commit 044f79d4890a59c474ca2da53ddf6ff6c0b2f0c6 Author: Bryce Harrington <br...@osg.samsung.com> Date: Fri Feb 6 18:01:33 2015 -0800 releasing: Tweak docs to better match actual workflow diff --git a/releasing.txt b/releasing.txt index ce94ed2..b704725 100644 --- a/releasing.txt +++ b/releasing.txt @@ -1,14 +1,19 @@ To make a release of Weston and/or Wayland, follow these steps. - 0. Update the first three lines of configure.ac to the intended + 0. Verify the test suites and codebase checks pass. All of the + tests pass should either pass or skip. + + $ make check + + 1. Update the first three lines of configure.ac to the intended version, commit. Also note that Weston includes versioned dependencies on 'wayland-server' and 'wayland-client' in - configure.ac which typically need updated as well. + configure.ac which typically need updated as well. Then commit + your changes: - 1. Verify the test suites and codebase checks pass. (All of the - tests pass should pass except for xwayland, which can be flaky.) - - $ make check + $ git status + $ git commit configure.ac -m "configure.ac: bump to version x.y.z for the xxx release" + $ git push 2. Run the release.sh script to generate the tarballs, sign and upload them, and generate a release announcement template. commit bf48e21fa18df9d2c917b8577633107e4b1681de Author: Jonas Ådahl <jad...@gmail.com> Date: Fri Feb 6 10:15:28 2015 +0800 desktop-shell: Fail if get_xdg_surface is called on an xdg_surface If a client calls xdg_shell.get_xdg_surface on a surface that is already an xdg_surface would, prior to this patch, succeed, but cause weston to crash later when trying to configure. This patch instead sends a role error to the client complaining that it already is an xdg_surface. Note that .._set_role() only fails when changing roles, not when setting the same role twice. The same is done for xdg_popup. Signed-off-by: Jonas Ådahl <jad...@gmail.com> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 26cadb6..f28fc10 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -3978,6 +3978,14 @@ xdg_get_xdg_surface(struct wl_client *client, struct desktop_shell *shell = sc->shell; struct shell_surface *shsurf; + shsurf = get_shell_surface(surface); + if (shsurf && shell_surface_is_xdg_surface(shsurf)) { + wl_resource_post_error(resource, XDG_SHELL_ERROR_ROLE, + "This wl_surface is already an " + "xdg_surface"); + return; + } + if (weston_surface_set_role(surface, "xdg_surface", resource, XDG_SHELL_ERROR_ROLE) < 0) return; @@ -4071,6 +4079,14 @@ xdg_get_xdg_popup(struct wl_client *client, struct weston_surface *parent; struct shell_seat *seat; + shsurf = get_shell_surface(surface); + if (shsurf && shell_surface_is_xdg_popup(shsurf)) { + wl_resource_post_error(resource, XDG_SHELL_ERROR_ROLE, + "This wl_surface is already an " + "xdg_popup"); + return; + } + if (weston_surface_set_role(surface, "xdg_popup", resource, XDG_SHELL_ERROR_ROLE) < 0) return; commit f10e06c77aee1c27e5f11f02e5ae6e1ae7fd36a5 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Feb 3 11:05:10 2015 -0600 xwm: remove the create surface listener in weston_wm_destroy Failing to remove this can result in a crash when the signal is sent after the window manager is destroyed. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-By: Giulio Camuffo <giuliocamu...@gmail.com> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 07c2ef3..ec3dab9 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -2229,6 +2229,7 @@ weston_wm_destroy(struct weston_wm *wm) wl_list_remove(&wm->activate_listener.link); wl_list_remove(&wm->kill_listener.link); wl_list_remove(&wm->transform_listener.link); + wl_list_remove(&wm->create_surface_listener.link); free(wm); } commit 82cc25b986669abf0a516eac0db936c5cd1e916b Author: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp> Date: Fri Feb 6 16:08:52 2015 +0900 ivi-shell: SEGV occurs when multi touch happens in transition of application launching. This is because cancel callback is mistakenly set to weston_touch_grab_interface. To fix this issue, add a callback, touch_move_workspace_grab_frame and set it to the weston_touch_grab_interface like desktop-shell. Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c index 36a1b56..2d15e06 100644 --- a/ivi-shell/hmi-controller.c +++ b/ivi-shell/hmi-controller.c @@ -1389,6 +1389,11 @@ pointer_move_workspace_grab_cancel(struct weston_pointer_grab *grab) } static void +touch_move_workspace_grab_frame(struct weston_touch_grab *grab) +{ +} + +static void touch_move_workspace_grab_cancel(struct weston_touch_grab *grab) { struct touch_grab *tg = (struct touch_grab *)grab; @@ -1408,6 +1413,7 @@ static const struct weston_touch_grab_interface touch_move_grab_workspace_interf touch_nope_grab_down, touch_move_workspace_grab_up, touch_move_grab_motion, + touch_move_workspace_grab_frame, touch_move_workspace_grab_cancel }; commit 7b9efcbcbf3d8916160b39dfc2c28ee1c309e4ff Author: Daniel Stone <dani...@collabora.com> Date: Thu Feb 5 15:31:10 2015 +0000 Update .gitignore Add autotools remnants, as well as more comprehensive vim swapfiles, Sublime Text configuration, and git format-patch output. Signed-off-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Derek Foreman <der...@osg.samsung.com> diff --git a/.gitignore b/.gitignore index 2aaeac9..aa24f9a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,10 @@ *.pc *.so *.swp +.*.sw? +.sw? +*.sublime-project +*.sublime-workspace *.trs *~ ctags @@ -16,14 +20,20 @@ cscope.out /aclocal.m4 /autom4te.cache /build-aux/ +/config.guess /config.h /config.h.in /config.log /config.mk /config.status +/config.sub /configure +/depcomp +/install-sh /libtool +/ltmain.sh /logs +/missing /stamp-h1 /test-driver /weston.ini @@ -33,6 +43,8 @@ TAGS protocol/.*.valid protocol/*.[ch] +00*.patch + weston-calibrator weston-clickdot weston-cliptest commit d540f4bb76359988cdc54b12d7ae4268a07375fa Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Jan 27 16:26:49 2015 -0600 compositor-x11: Move the x11 window close to an idle handler The input loop is actually dispatched in the middle of the frame repaint. When the X11 event results in closing the compositor, this can cause the current output to be destroyed just prior to trying to process animations on it. We fix this by handling the window close event in an idle callback. NOTE: this requires a patch for wayland that moves the idle handler dispatch to after epoll_wait in the event loop processing. Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314 Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Daniel Stone <dani...@collabora.com> diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 2792251..aa1e519 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -117,6 +117,11 @@ struct x11_output { int32_t scale; }; +struct window_delete_data { + struct x11_compositor *compositor; + xcb_window_t window; +}; + struct gl_renderer_interface *gl_renderer; static struct xkb_keymap * @@ -941,6 +946,14 @@ x11_compositor_delete_window(struct x11_compositor *c, xcb_window_t window) wl_display_terminate(c->base.wl_display); } +static void delete_cb(void *data) +{ + struct window_delete_data *wd = data; + + x11_compositor_delete_window(wd->compositor, wd->window); + free(wd); +} + #ifdef HAVE_XCB_XKB static void update_xkb_state(struct x11_compositor *c, xcb_xkb_state_notify_event_t *state) @@ -1284,8 +1297,23 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data) client_message = (xcb_client_message_event_t *) event; atom = client_message->data.data32[0]; window = client_message->window; - if (atom == c->atom.wm_delete_window) - x11_compositor_delete_window(c, window); + if (atom == c->atom.wm_delete_window) { + struct wl_event_loop *loop; + struct window_delete_data *data = malloc(sizeof *data); + + /* if malloc failed we should at least try to + * delete the window, even if it may result in + * a crash. + */ + if (!data) { + x11_compositor_delete_window(c, window); + break; + } + data->compositor = c; + data->window = window; + loop = wl_display_get_event_loop(c->base.wl_display); + wl_event_loop_add_idle(loop, delete_cb, data); + } break; case XCB_FOCUS_IN: commit 3e4d4bdd94f6db154e77df72cc2da366cf72629f Author: Dima Ryazanov <d...@gmail.com> Date: Wed Feb 4 01:51:57 2015 -0800 Fix "Back", "Forward", and other special mouse buttons in the X11 compositor. They're off by 4 because of the scroll buttons. Signed-off-by: Dima Ryazanov <d...@gmail.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 5863446..2792251 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -1017,8 +1017,8 @@ x11_compositor_deliver_button_event(struct x11_compositor *c, update_xkb_state_from_core(c, button_event->state); switch (button_event->detail) { - default: - button = button_event->detail + BTN_LEFT - 1; + case 1: + button = BTN_LEFT; break; case 2: button = BTN_MIDDLE; @@ -1056,6 +1056,9 @@ x11_compositor_deliver_button_event(struct x11_compositor *c, WL_POINTER_AXIS_HORIZONTAL_SCROLL, DEFAULT_AXIS_STEP_DISTANCE); return; + default: + button = button_event->detail + BTN_SIDE - 8; + break; } notify_button(&c->core_seat, commit 90d1ac8d491e97b0244aa19ba6fe0d2ac934b720 Author: Jonas Ådahl <jad...@gmail.com> Date: Fri Jan 30 12:23:00 2015 +0800 libinput: Only forward first and last press and release for a key Keyboard key events will be received from a device where a key has been pressed, even though an equivalent key has been pressed (same key code) on a device connected to the same seat. notify_key() expects to only be called as if there was only one keyboard device associated with the given seat, so to achieve this, ignore every event where forwarding it would result in multiple 'pressed' or 'released' notifications. Signed-off-by: Jonas Ådahl <jad...@gmail.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Derek Foreman <der...@osg.samsung.com> diff --git a/src/libinput-device.c b/src/libinput-device.c index 5c5b9b9..567e5ea 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -59,6 +59,17 @@ handle_keyboard_key(struct libinput_device *libinput_device, { struct evdev_device *device = libinput_device_get_user_data(libinput_device); + int key_state = + libinput_event_keyboard_get_key_state(keyboard_event); + int seat_key_count = + libinput_event_keyboard_get_seat_key_count(keyboard_event); + + /* Ignore key events that are not seat wide state changes. */ + if ((key_state == LIBINPUT_KEY_STATE_PRESSED && + seat_key_count != 1) || + (key_state == LIBINPUT_KEY_STATE_RELEASED && + seat_key_count != 0)) + return; notify_key(device->seat, libinput_event_keyboard_get_time(keyboard_event), commit e90b9e9b5958d3e613d7e08f58321fc664084dde Author: Jonas Ådahl <jad...@gmail.com> Date: Fri Jan 30 12:22:59 2015 +0800 libinput: Only forward first and last press and release for a button Pointer button events will be received from a device where a button has been pressed, even though an equivalent button has been pressed (same button code) on a device connected to the same seat. notify_button() expects to only be called as if there was only one pointer device associated with the given seat, so to achieve this, ignore every event where forwarding it would result in multiple 'pressed' or 'released' notifications. Signed-off-by: Jonas Ådahl <jad...@gmail.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Daniel Stone <dani...@collabora.com> diff --git a/src/libinput-device.c b/src/libinput-device.c index 3ce74b8..5c5b9b9 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -119,6 +119,17 @@ handle_pointer_button(struct libinput_device *libinput_device, { struct evdev_device *device = libinput_device_get_user_data(libinput_device); + int button_state = + libinput_event_pointer_get_button_state(pointer_event); + int seat_button_count = + libinput_event_pointer_get_seat_button_count(pointer_event); + + /* Ignore button events that are not seat wide state changes. */ + if ((button_state == LIBINPUT_BUTTON_STATE_PRESSED && + seat_button_count != 1) || + (button_state == LIBINPUT_BUTTON_STATE_RELEASED && + seat_button_count != 0)) + return; notify_button(device->seat, libinput_event_pointer_get_time(pointer_event), commit 6b4b24155fb3f6fbfc98f38ba3eb5f2f3115371f Author: Giulio Camuffo <giuliocamu...@gmail.com> Date: Thu Jan 29 19:06:49 2015 +0200 xwm: support maximizing xwayland windows This patch adds the maximize button to the window frame for the windows which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell via a new method in weston_shell_interface. Additionally, it also listens for the wm hints coming from the client, but it doesn't support maximizing a window only vertically or horizontally. The window will be maximized only when both directions are maximized. Reviewed-by: Daniel Stone <dani...@collabora.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 742a710..26cadb6 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -3000,6 +3000,51 @@ shell_interface_set_fullscreen(struct shell_surface *shsurf, set_fullscreen(shsurf, method, framerate, output); } +static struct weston_output * +get_focused_output(struct weston_compositor *compositor) +{ + struct weston_seat *seat; + struct weston_output *output = NULL; + + wl_list_for_each(seat, &compositor->seat_list, link) { + /* Priority has touch focus, then pointer and + * then keyboard focus. We should probably have + * three for loops and check frist for touch, + * then for pointer, etc. but unless somebody has some + * objections, I think this is sufficient. */ + if (seat->touch && seat->touch->focus) + output = seat->touch->focus->output; + else if (seat->pointer && seat->pointer->focus) + output = seat->pointer->focus->output; + else if (seat->keyboard && seat->keyboard->focus) + output = seat->keyboard->focus->output; + + if (output) + break; + } + + return output; +} + +static void +shell_interface_set_maximized(struct shell_surface *shsurf) +{ + struct weston_output *output; + + surface_clear_next_states(shsurf); + shsurf->next_state.maximized = true; + shsurf->state_changed = true; + shsurf->type = SHELL_SURFACE_TOPLEVEL; + + if (!weston_surface_is_mapped(shsurf->surface)) + output = get_focused_output(shsurf->surface->compositor); + else + output = shsurf->surface->output; + + shell_surface_set_output(shsurf, output); + send_configure_for_surface(shsurf); +} + static int shell_interface_move(struct shell_surface *shsurf, struct weston_seat *ws) { @@ -3605,32 +3650,6 @@ get_primary_view(void *shell, struct shell_surface *shsurf) return shsurf->view; } -static struct weston_output * -get_focused_output(struct weston_compositor *compositor) -{ - struct weston_seat *seat; - struct weston_output *output = NULL; - - wl_list_for_each(seat, &compositor->seat_list, link) { - /* Priority has touch focus, then pointer and - * then keyboard focus. We should probably have - * three for loops and check frist for touch, - * then for pointer, etc. but unless somebody has some - * objections, I think this is sufficient. */ - if (seat->touch && seat->touch->focus) - output = seat->touch->focus->output; - else if (seat->pointer && seat->pointer->focus) - output = seat->pointer->focus->output; - else if (seat->keyboard && seat->keyboard->focus) - output = seat->keyboard->focus->output; - - if (output) - break; - } - - return output; -} - static void shell_get_shell_surface(struct wl_client *client, struct wl_resource *resource, @@ -6633,6 +6652,7 @@ module_init(struct weston_compositor *ec, ec->shell_interface.resize = surface_resize; ec->shell_interface.set_title = set_title; ec->shell_interface.set_window_geometry = set_window_geometry; + ec->shell_interface.set_maximized = shell_interface_set_maximized; weston_layer_init(&shell->fullscreen_layer, &ec->cursor_layer.link); weston_layer_init(&shell->panel_layer, &shell->fullscreen_layer.link); diff --git a/src/compositor.h b/src/compositor.h index aa87ec0..5c0ea74 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -121,6 +121,7 @@ struct weston_shell_interface { void (*set_window_geometry)(struct shell_surface *shsurf, int32_t x, int32_t y, int32_t width, int32_t height); + void (*set_maximized)(struct shell_surface *shsurf); }; struct weston_animation { diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 4d3611f..07c2ef3 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -144,6 +144,8 @@ struct weston_wm_window { int fullscreen; int has_alpha; int delete_window; + int maximized_vert; + int maximized_horz; struct wm_size_hints size_hints; struct motif_wm_hints motif_hints; struct wl_list link; @@ -472,6 +474,10 @@ weston_wm_window_read_properties(struct weston_wm_window *window) for (i = 0; i < reply->value_len; i++) if (atom[i] == wm->atom.net_wm_state_fullscreen) window->fullscreen = 1; + if (atom[i] == wm->atom.net_wm_state_maximized_vert) + window->maximized_vert = 1; + if (atom[i] == wm->atom.net_wm_state_maximized_horz) + window->maximized_horz = 1; break; case TYPE_MOTIF_WM_HINTS: memcpy(&window->motif_hints, @@ -479,7 +485,7 @@ weston_wm_window_read_properties(struct weston_wm_window *window) sizeof window->motif_hints); if (window->motif_hints.flags & MWM_HINTS_DECORATIONS) window->decorate = - window->motif_hints.decorations > 0; + window->motif_hints.decorations; break; default: break; @@ -789,12 +795,16 @@ static void weston_wm_window_set_net_wm_state(struct weston_wm_window *window) { struct weston_wm *wm = window->wm; - uint32_t property[1]; + uint32_t property[3]; int i; i = 0; if (window->fullscreen) property[i++] = wm->atom.net_wm_state_fullscreen; + if (window->maximized_vert) + property[i++] = wm->atom.net_wm_state_maximized_vert; + if (window->maximized_horz) + property[i++] = wm->atom.net_wm_state_maximized_horz; xcb_change_property(wm->conn, XCB_PROP_MODE_REPLACE, @@ -811,10 +821,14 @@ weston_wm_window_create_frame(struct weston_wm_window *window) struct weston_wm *wm = window->wm; uint32_t values[3]; int x, y, width, height; + int buttons = FRAME_BUTTON_CLOSE; + + if (window->decorate & MWM_DECOR_MAXIMIZE) + buttons |= FRAME_BUTTON_MAXIMIZE; window->frame = frame_create(window->wm->theme, window->width, window->height, - FRAME_BUTTON_CLOSE, window->name); + buttons, window->name); frame_resize_inside(window->frame, window->width, window->height); weston_wm_window_get_frame_size(window, &width, &height); @@ -1332,6 +1346,28 @@ static void weston_wm_window_configure(void *data); static void +weston_wm_window_set_toplevel(struct weston_wm_window *window) +{ + struct weston_shell_interface *shell_interface = + &window->wm->server->compositor->shell_interface; + + shell_interface->set_toplevel(window->shsurf); + window->width = window->saved_width; + window->height = window->saved_height; + if (window->frame) + frame_resize_inside(window->frame, + window->width, + window->height); + weston_wm_window_configure(window); +} + +static inline bool +weston_wm_window_is_maximized(struct weston_wm_window *window) +{ + return window->maximized_horz && window->maximized_vert; +} + +static void weston_wm_window_handle_state(struct weston_wm_window *window, xcb_client_message_event_t *client_message) { @@ -1339,6 +1375,7 @@ weston_wm_window_handle_state(struct weston_wm_window *window, struct weston_shell_interface *shell_interface = &wm->server->compositor->shell_interface; uint32_t action, property; + int maximized = weston_wm_window_is_maximized(window); action = client_message->data.data32[0]; property = client_message->data.data32[1]; @@ -1356,15 +1393,26 @@ weston_wm_window_handle_state(struct weston_wm_window *window, 0, NULL); } else { if (window->shsurf) - shell_interface->set_toplevel(window->shsurf); - - window->width = window->saved_width; - window->height = window->saved_height; - if (window->frame) - frame_resize_inside(window->frame, - window->width, - window->height); - weston_wm_window_configure(window); + weston_wm_window_set_toplevel(window); + } + } else { + if (property == wm->atom.net_wm_state_maximized_vert && + update_state(action, &window->maximized_vert)) + weston_wm_window_set_net_wm_state(window); + if (property == wm->atom.net_wm_state_maximized_horz && + update_state(action, &window->maximized_horz)) + weston_wm_window_set_net_wm_state(window); + + if (maximized != weston_wm_window_is_maximized(window)) { + if (weston_wm_window_is_maximized(window)) { + window->saved_width = window->width; + window->saved_height = window->height; + + if (window->shsurf) + shell_interface->set_maximized(window->shsurf); + } else if (window->shsurf) { + weston_wm_window_set_toplevel(window); + } } } } @@ -1696,6 +1744,19 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event) weston_wm_window_close(window, button->time); frame_status_clear(window->frame, FRAME_STATUS_CLOSE); } + + if (frame_status(window->frame) & FRAME_STATUS_MAXIMIZE) { + window->maximized_horz = !window->maximized_horz; + window->maximized_vert = !window->maximized_vert; + if (weston_wm_window_is_maximized(window)) { + window->saved_width = window->width; + window->saved_height = window->height; + shell_interface->set_maximized(window->shsurf); + } else { + weston_wm_window_set_toplevel(window); + } + frame_status_clear(window->frame, FRAME_STATUS_MAXIMIZE); + } } static void @@ -1884,6 +1945,8 @@ weston_wm_get_resources(struct weston_wm *wm) { "_NET_WM_PID", F(atom.net_wm_pid) }, { "_NET_WM_ICON", F(atom.net_wm_icon) }, { "_NET_WM_STATE", F(atom.net_wm_state) }, + { "_NET_WM_STATE_MAXIMIZED_VERT", F(atom.net_wm_state_maximized_vert) }, + { "_NET_WM_STATE_MAXIMIZED_HORZ", F(atom.net_wm_state_maximized_horz) }, { "_NET_WM_STATE_FULLSCREEN", F(atom.net_wm_state_fullscreen) }, { "_NET_WM_USER_TIME", F(atom.net_wm_user_time) }, { "_NET_WM_ICON_NAME", F(atom.net_wm_icon_name) }, @@ -2061,7 +2124,7 @@ weston_wm_create(struct weston_xserver *wxs, int fd) struct wl_event_loop *loop; xcb_screen_iterator_t s; uint32_t values[1]; - xcb_atom_t supported[3]; + xcb_atom_t supported[5]; wm = zalloc(sizeof *wm); if (wm == NULL) @@ -2112,6 +2175,8 @@ weston_wm_create(struct weston_xserver *wxs, int fd) supported[0] = wm->atom.net_wm_moveresize; supported[1] = wm->atom.net_wm_state; supported[2] = wm->atom.net_wm_state_fullscreen; + supported[3] = wm->atom.net_wm_state_maximized_vert; + supported[4] = wm->atom.net_wm_state_maximized_horz; xcb_change_property(wm->conn, XCB_PROP_MODE_REPLACE, wm->screen->root, @@ -2389,6 +2454,8 @@ xserver_map_shell_surface(struct weston_wm_window *window, parent->surface, window->x - parent->x, window->y - parent->y, flags); + } else if (weston_wm_window_is_maximized(window)) { + shell_interface->set_maximized(window->shsurf); } else { if (weston_wm_window_type_inactive(window)) { shell_interface->set_xwayland(window->shsurf, diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h index b42110b..54cbf6d 100644 --- a/xwayland/xwayland.h +++ b/xwayland/xwayland.h @@ -102,6 +102,8 @@ struct weston_wm { xcb_atom_t net_wm_pid; xcb_atom_t net_wm_icon; xcb_atom_t net_wm_state; + xcb_atom_t net_wm_state_maximized_vert; + xcb_atom_t net_wm_state_maximized_horz; xcb_atom_t net_wm_state_fullscreen; xcb_atom_t net_wm_user_time; xcb_atom_t net_wm_icon_name; commit 8aeeac827f37fb070f08fecbe18743820bc70437 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jan 30 13:24:36 2015 -0600 desktop-shell: Remove unnecessary type casts Remove a few instances of casting weston_seat to weston_seat. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Jon A. Cruz <j...@osg.samsung.com> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 456763d..742a710 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4515,7 +4515,7 @@ move_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void *dat shsurf->state.maximized) return; - surface_move(shsurf, (struct weston_seat *) seat, 0); + surface_move(shsurf, seat, 0); } static void @@ -4585,7 +4585,7 @@ touch_move_binding(struct weston_seat *seat, uint32_t time, void *data) shsurf->state.maximized) return; - surface_touch_move(shsurf, (struct weston_seat *) seat); + surface_touch_move(shsurf, seat); } static void @@ -4630,7 +4630,7 @@ resize_binding(struct weston_seat *seat, uint32_t time, uint32_t button, void *d else edges |= WL_SHELL_SURFACE_RESIZE_BOTTOM; - surface_resize(shsurf, (struct weston_seat *) seat, edges); + surface_resize(shsurf, seat, edges); } static void @@ -4666,8 +4666,7 @@ static void do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis, wl_fixed_t value) { - struct weston_seat *ws = (struct weston_seat *) seat; - struct weston_compositor *compositor = ws->compositor; + struct weston_compositor *compositor = seat->compositor; struct weston_output *output; float increment; @@ -5946,7 +5945,7 @@ switcher_destroy(struct switcher *switcher) if (switcher->current) activate(switcher->shell, switcher->current, - (struct weston_seat *) keyboard->seat, true); + keyboard->seat, true); wl_list_remove(&switcher->listener.link); weston_keyboard_end_grab(keyboard); if (keyboard->input_method_resource) @@ -5984,7 +5983,7 @@ switcher_modifier(struct weston_keyboard_grab *grab, uint32_t serial, uint32_t mods_locked, uint32_t group) { struct switcher *switcher = container_of(grab, struct switcher, grab); - struct weston_seat *seat = (struct weston_seat *) grab->keyboard->seat; + struct weston_seat *seat = grab->keyboard->seat; if ((seat->modifier_state & switcher->shell->binding_modifier) == 0) switcher_destroy(switcher); @@ -6180,7 +6179,7 @@ debug_binding(struct weston_seat *seat, uint32_t time, uint32_t key, void *data) if (!grab) return; - grab->seat = (struct weston_seat *) seat; + grab->seat = seat; grab->key[0] = key; grab->grab.interface = &debug_binding_keyboard_grab; weston_keyboard_start_grab(seat->keyboard, &grab->grab); commit aff7c334fa998cd72715c9ec168cd3333dfdcfd2 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Feb 2 13:03:23 2015 -0600 screenshooter: remove useless cast Signed-off-by: Derek Foreman <der...@osg.samsung.com> diff --git a/src/screenshooter.c b/src/screenshooter.c index c98e2f9..4e32db5 100644 --- a/src/screenshooter.c +++ b/src/screenshooter.c @@ -558,8 +558,7 @@ weston_recorder_destroy(struct weston_recorder *recorder) static void recorder_binding(struct weston_seat *seat, uint32_t time, uint32_t key, void *data) { - struct weston_seat *ws = (struct weston_seat *) seat; - struct weston_compositor *ec = ws->compositor; + struct weston_compositor *ec = seat->compositor; struct weston_output *output; struct wl_listener *listener = NULL; struct weston_recorder *recorder; commit 7424c81217d264e586be1ca3350a97b510f58814 Author: Bryce Harrington <br...@osg.samsung.com> Date: Fri Jan 30 19:12:47 2015 -0800 configure.ac: bump to version 1.6.92 for the rc1 release diff --git a/configure.ac b/configure.ac index 163d130..ec7739d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [6]) -m4_define([weston_micro_version], [91]) +m4_define([weston_micro_version], [92]) m4_define([weston_version], [weston_major_version.weston_minor_version.weston_micro_version]) @@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h]) AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) -COMPOSITOR_MODULES="wayland-server >= 1.6.91 pixman-1 >= 0.25.2" +COMPOSITOR_MODULES="wayland-server >= 1.6.92 pixman-1 >= 0.25.2" AC_ARG_ENABLE(egl, [ --disable-egl],, enable_egl=yes) @@ -292,7 +292,7 @@ AC_SUBST(JPEG_LIBS) PKG_CHECK_MODULES(CAIRO, [cairo]) -PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.91]) +PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.92]) AC_ARG_ENABLE(simple-clients, AS_HELP_STRING([--disable-simple-clients], commit 7154c18d76b0e6a0de35d90c270b40287fe7bce4 Author: Bryce Harrington <br...@osg.samsung.com> Date: Fri Jan 30 19:10:12 2015 -0800 releasing: Directions for updating the website diff --git a/releasing.txt b/releasing.txt index 4f4174b..ce94ed2 100644 --- a/releasing.txt +++ b/releasing.txt @@ -35,10 +35,15 @@ To make a release of Weston and/or Wayland, follow these steps. http://lists.freedesktop.org/archives/wayland-devel/ 6. Update releases.html in wayland-web with links to tarballs and - the release email URL + the release email URL. + + $ git commit releases.html -m "Add x.y.z release" + $ git push + $ rsync -avz * wayland.freedesktop.org:/srv/wayland.freedesktop.org/www/ 7. Update topic in #wayland to point to the release announcement URL + For x.y.0 releases, also create the x.y branch. The x.y branch is for bug fixes and conservative changes to the x.y.0 release, and is where we release x.y.z releases from. Creating the x.y branch opens up commit 7ef3bed03cee03a746f739c30320a0599be1ea0c Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Jan 6 14:28:13 2015 -0600 desktop-shell: Don't crash on zoom without a pointer in the seat The zoom effect zooms at the seat's current pointer location. When no pointer is present the zoom key bindings cause a crash. Instead, check for the absence of a pointer and log a warning. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index f6d9c79..456763d 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4671,6 +4671,11 @@ do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis, struct weston_output *output; float increment; + if (!seat->pointer) { + weston_log("Zoom hotkey pressed but seat '%s' contains no pointer.\n", seat->seat_name); + return; + } + wl_list_for_each(output, &compositor->output_list, link) { if (pixman_region32_contains_point(&output->region, wl_fixed_to_double(seat->pointer->x), commit 8771a14ff38b7c568e3e3fe99fef8681f5792ad3 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Jan 29 16:44:55 2015 -0600 xwayland-test: Replace the xwayland-test The old xwayland-test hasn't worked in a while... This new test checks that the wayland specific WL_SURFACE_ID atom exists, checks that the window manager name is "Weston WM" and then maps a window and waits for an exposure event. Signed-off-by: Derek Foreman <der...@osg.samsung.com> Reviewed-by: Bryce Harrington <br...@osg.samsung.com> -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1yleyl-0005nr...@moszumanska.debian.org