weston: Changes to 'upstream-unstable'
.gitignore | 1
Makefile.am | 472 +-
README | 146
clients/cliptest.c | 2
clients/confine.c | 531 +++
clients/desktop-shell.c | 8
clients/editor.c | 3
clients/eventdemo.c | 1
clients/ivi-shell-user-interface.c | 3
clients/keyboard.c | 43
clients/multi-resource.c | 10
clients/nested-client.c | 1
clients/nested.c | 13
clients/presentation-shm.c | 3
clients/resizor.c | 158
clients/scaler.c | 44
clients/simple-damage.c | 127
clients/simple-dmabuf-intel.c | 120
clients/simple-dmabuf-v4l.c | 123
clients/simple-egl.c | 122
clients/simple-shm.c | 96
clients/simple-touch.c | 3
clients/stacking.c | 1
clients/terminal.c | 74
clients/weston-info.c | 1
clients/weston-simple-im.c | 15
clients/window.c | 641 +++
clients/window.h | 67
compositor/cms-colord.c | 567 +++
compositor/cms-helper.c | 136
compositor/cms-helper.h | 75
compositor/cms-static.c | 119
compositor/main.c | 1791 ++++++++++
compositor/screen-share.c | 1129 ++++++
compositor/systemd-notify.c | 165
compositor/text-backend.c | 1085 ++++++
compositor/weston-screenshooter.c | 192 +
compositor/weston.desktop | 5
compositor/weston.h | 73
compositor/weston.pc.in | 12
compositor/xwayland.c | 209 +
configure.ac | 80
desktop-shell/exposay.c | 14
desktop-shell/input-panel.c | 19
desktop-shell/shell.c | 3264 ++++---------------
desktop-shell/shell.h | 16
fullscreen-shell/fullscreen-shell.c | 115
ivi-shell/hmi-controller.c | 18
ivi-shell/input-panel-ivi.c | 19
ivi-shell/ivi-layout-export.h | 11
ivi-shell/ivi-layout-private.h | 25
ivi-shell/ivi-layout-shell.h | 3
ivi-shell/ivi-layout-transition.c | 3
ivi-shell/ivi-layout.c | 300 +
ivi-shell/ivi-shell.c | 42
ivi-shell/ivi-shell.h | 6
libweston-desktop/client.c | 212 +
libweston-desktop/internal.h | 236 +
libweston-desktop/libweston-desktop.c | 244 +
libweston-desktop/libweston-desktop.h | 166
libweston-desktop/libweston-desktop.pc.in | 11
libweston-desktop/seat.c | 368 ++
libweston-desktop/surface.c | 810 ++++
libweston-desktop/wl-shell.c | 466 ++
libweston-desktop/xdg-shell-v5.c | 822 ++++
libweston-desktop/xdg-shell-v6.c | 1276 +++++++
libweston-desktop/xwayland.c | 375 ++
libweston/animation.c | 502 ++
libweston/bindings.c | 580 +++
libweston/clipboard.c | 307 +
libweston/compositor-drm.c | 3285 +++++++++++++++++++
libweston/compositor-drm.h | 138
libweston/compositor-fbdev.c | 784 ++++
libweston/compositor-fbdev.h | 63
libweston/compositor-headless.c | 274 +
libweston/compositor-headless.h | 56
libweston/compositor-rdp.c | 1346 +++++++
libweston/compositor-rdp.h | 54
libweston/compositor-wayland.c | 2361 +++++++++++++
libweston/compositor-wayland.h | 63
libweston/compositor-x11.c | 1745 ++++++++++
libweston/compositor-x11.h | 64
libweston/compositor.c | 5119 ++++++++++++++++++++++++++++++
libweston/compositor.h | 1820 ++++++++++
libweston/data-device.c | 1343 +++++++
libweston/dbus.c | 408 ++
libweston/dbus.h | 110
libweston/gl-renderer.c | 3191 ++++++++++++++++++
libweston/gl-renderer.h | 117
libweston/input.c | 4558 ++++++++++++++++++++++++++
libweston/launcher-direct.c | 315 +
libweston/launcher-impl.h | 45
libweston/launcher-logind.c | 840 ++++
libweston/launcher-util.c | 118
libweston/launcher-util.h | 58
libweston/launcher-weston-launch.c | 286 +
libweston/libbacklight.c | 318 +
libweston/libbacklight.h | 79
libweston/libinput-device.c | 604 +++
libweston/libinput-device.h | 80
libweston/libinput-seat.c | 417 ++
libweston/libinput-seat.h | 72
libweston/libweston.pc.in | 11
libweston/linux-dmabuf.c | 498 ++
libweston/linux-dmabuf.h | 88
libweston/log.c | 98
libweston/noop-renderer.c | 122
libweston/pixman-renderer.c | 932 +++++
libweston/pixman-renderer.h | 40
libweston/plugin-registry.c | 156
libweston/plugin-registry.h | 55
libweston/screenshooter.c | 488 ++
libweston/spring-tool.c | 76
libweston/timeline-object.h | 55
libweston/timeline.c | 292 +
libweston/timeline.h | 65
libweston/vaapi-recorder.c | 1161 ++++++
libweston/vaapi-recorder.h | 38
libweston/version.h.in | 50
libweston/vertex-clipping.c | 330 +
libweston/vertex-clipping.h | 66
libweston/weston-egl-ext.h | 156
libweston/weston-launch.c | 782 ++++
libweston/weston-launch.h | 49
libweston/zoom.c | 178 +
man/weston.ini.man | 1
protocol/scaler.xml | 208 -
releasing.txt | 21
shared/config-parser.c | 60
shared/config-parser.h | 6
shared/frame.c | 1
shared/helpers.h | 11
shared/image-loader.c | 4
shared/option-parser.c | 14
shared/platform.h | 47
shared/string-helpers.h | 70
shared/xalloc.c | 6
shared/xalloc.h | 1
src/animation.c | 485 --
src/bindings.c | 579 ---
src/clipboard.c | 306 -
src/cms-colord.c | 568 ---
src/cms-helper.c | 135
src/cms-helper.h | 75
src/cms-static.c | 118
src/compositor-drm.c | 3238 ------------------
src/compositor-drm.h | 127
src/compositor-fbdev.c | 851 ----
src/compositor-fbdev.h | 51
src/compositor-headless.c | 284 -
src/compositor-headless.h | 53
src/compositor-rdp.c | 1324 -------
src/compositor-rdp.h | 54
src/compositor-rpi.c | 575 ---
src/compositor-wayland.c | 2350 -------------
src/compositor-wayland.h | 61
src/compositor-x11.c | 1722 ----------
src/compositor-x11.h | 62
src/compositor.c | 5012 -----------------------------
src/compositor.h | 1732 ----------
src/data-device.c | 1340 -------
src/dbus.c | 407 --
src/dbus.h | 110
src/gl-renderer.c | 3157 ------------------
src/gl-renderer.h | 132
src/input.c | 2765 ----------------
src/launcher-direct.c | 315 -
src/launcher-impl.h | 45
src/launcher-logind.c | 839 ----
src/launcher-util.c | 117
src/launcher-util.h | 58
src/launcher-weston-launch.c | 300 -
src/libbacklight.c | 310 -
src/libbacklight.h | 79
src/libinput-device.c | 620 ---
src/libinput-device.h | 78
src/libinput-seat.c | 411 --
src/libinput-seat.h | 65
src/linux-dmabuf.c | 497 --
src/linux-dmabuf.h | 88
src/log.c | 143
src/main.c | 1487 --------
src/noop-renderer.c | 121
src/pixman-renderer.c | 931 -----
src/pixman-renderer.h | 40
src/rpi-bcm-stubs.h | 327 -
src/rpi-renderer.c | 1830 ----------
src/rpi-renderer.h | 52
src/screen-share.c | 1127 ------
src/screenshooter.c | 634 ---
src/spring-tool.c | 74
src/systemd-notify.c | 168
src/text-backend.c | 1082 ------
src/timeline-object.h | 55
src/timeline.c | 292 -
src/timeline.h | 65
src/vaapi-recorder.c | 1161 ------
src/vaapi-recorder.h | 38
src/version.h.in | 50
src/vertex-clipping.c | 330 -
src/vertex-clipping.h | 66
src/weston-egl-ext.h | 120
src/weston-launch.c | 770 ----
src/weston-launch.h | 49
src/weston.desktop | 5
src/weston.pc.in | 12
src/zoom.c | 177 -
tests/buffer-count-test.c | 1
tests/config-parser-test.c | 186 +
tests/event-test.c | 26
tests/internal-screenshot-test.c | 80
tests/ivi-test.h | 1
tests/ivi_layout-internal-test.c | 3
tests/ivi_layout-test-plugin.c | 49
tests/ivi_layout-test.c | 12
tests/keyboard-test.c | 2
tests/plugin-registry-test.c | 101
tests/presentation-test.c | 3
tests/string-test.c | 87
tests/surface-global-test.c | 3
tests/surface-screenshot.c | 1
tests/surface-test.c | 2
tests/text-test.c | 1
tests/vertex-clip-test.c | 2
tests/viewporter-test.c | 553 +++
tests/weston-test-client-helper.c | 588 ++-
tests/weston-test-client-helper.h | 40
tests/weston-test.c | 26
tests/weston-tests-env | 4
wcap/wcap-decode.h | 2
xwayland/dnd.c | 1
xwayland/hash.c | 2
xwayland/hash.h | 2
xwayland/launcher.c | 282 -
xwayland/selection.c | 1
xwayland/window-manager.c | 134
xwayland/xwayland-api.h | 176 +
xwayland/xwayland-internal-interface.h | 62
xwayland/xwayland.h | 10
239 files changed, 53400 insertions(+), 46808 deletions(-)
New commits:
commit a08dff5bce52804850595a5ff968336a60574f4f
Author: Bryce Harrington <bryce@osg.samsung.com>
Date: Tue Sep 20 12:22:46 2016 -0700
configure.ac: bump to version 1.12.0 for the official release
diff --git a/configure.ac b/configure.ac
index bd59725..619d3f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
m4_define([weston_major_version], [1])
-m4_define([weston_minor_version], [11])
-m4_define([weston_micro_version], [94])
+m4_define([weston_minor_version], [12])
+m4_define([weston_micro_version], [0])
m4_define([weston_version],
[weston_major_version.weston_minor_version.weston_micro_version])
m4_define([libweston_major_version], [1])
-m4_define([libweston_minor_version], [11])
-m4_define([libweston_patch_version], [94])
+m4_define([libweston_minor_version], [12])
+m4_define([libweston_patch_version], [0])
AC_PREREQ([2.64])
AC_INIT([weston],
@@ -14,7 +14,7 @@ AC_INIT([weston],
[weston],
[http://wayland.freedesktop.org])
-WAYLAND_PREREQ_VERSION="1.11.91"
+WAYLAND_PREREQ_VERSION="1.12.0"
AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
commit a56b053ee154fd8c5b6782fa120ddc045e4e0147
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Tue Sep 13 10:05:58 2016 +0200
libweston-desktop: Fix configure event for already well-sized surfaces
Even if the surface size is already correct, we need to store the
configured size in case some other state change triggers a configure
event.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c
index 74ce473..ded69f7 100644
--- a/libweston-desktop/wl-shell.c
+++ b/libweston-desktop/wl-shell.c
@@ -67,8 +67,8 @@ weston_desktop_wl_shell_surface_set_size(struct weston_desktop_surface *dsurface
struct weston_surface *wsurface =
weston_desktop_surface_get_surface(surface->surface);
- if (wsurface->width == width && wsurface->height == height)
- return;
+ if ((wsurface->width == width && wsurface->height == height) ||
+ (width == 0 && height == 0))
wl_shell_surface_send_configure(surface->resource,
WL_SHELL_SURFACE_RESIZE_NONE,
diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
index 83e5d30..14216b0 100644
--- a/libweston-desktop/xdg-shell-v5.c
+++ b/libweston-desktop/xdg-shell-v5.c
@@ -192,11 +192,13 @@ weston_desktop_xdg_surface_set_size(struct weston_desktop_surface *dsurface,
struct weston_desktop_xdg_surface *surface = user_data;
struct weston_surface *wsurface = weston_desktop_surface_get_surface(surface->surface);
- if (wsurface->width == width && wsurface->height == height)
- return;
-
surface->requested_size.width = width;
surface->requested_size.height = height;
+
+ if ((wsurface->width == width && wsurface->height == height) ||
+ (width == 0 && height == 0))
+ return;
+
weston_desktop_xdg_surface_schedule_configure(surface);
}
diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index d4d0112..2afce81 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -607,11 +607,13 @@ weston_desktop_xdg_toplevel_set_size(struct weston_desktop_surface *dsurface,
struct weston_surface *wsurface =
weston_desktop_surface_get_surface(toplevel->base.desktop_surface);
- if (wsurface->width == width && wsurface->height == height)
- return;
-
toplevel->requested_size.width = width;
toplevel->requested_size.height = height;
+
+ if ((wsurface->width == width && wsurface->height == height) ||
+ (width == 0 && height == 0))
+ return;
+
weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
}
commit 870f384d0eb364ba049a73f682cef981704c3385
Author: Bryce Harrington <bryce@osg.samsung.com>
Date: Tue Sep 13 12:18:23 2016 -0700
configure.ac: bump to version 1.11.94 for the RC2 release
diff --git a/configure.ac b/configure.ac
index 076b336..bd59725 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
m4_define([weston_major_version], [1])
m4_define([weston_minor_version], [11])
-m4_define([weston_micro_version], [93])
+m4_define([weston_micro_version], [94])
m4_define([weston_version],
[weston_major_version.weston_minor_version.weston_micro_version])
m4_define([libweston_major_version], [1])
m4_define([libweston_minor_version], [11])
-m4_define([libweston_patch_version], [93])
+m4_define([libweston_patch_version], [94])
AC_PREREQ([2.64])
AC_INIT([weston],
commit 0abf8903cbdc95d1ddc464476efe0db4fd710f06
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Sun Sep 11 11:34:47 2016 +0200
libweston-desktop/xdg_shell_v6: Raise errors on not-yet-possible requests
These requests need a mapped surface, which can only happen after the
initial configure event.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index fbf3e69..d4d0112 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -349,6 +349,13 @@ weston_desktop_xdg_toplevel_protocol_show_window_menu(struct wl_client *wl_clien
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ if (!toplevel->base.configured) {
+ wl_resource_post_error(toplevel->resource,
+ ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+ "Surface has not been configured yet");
+ return;
+ }
+
weston_desktop_api_show_window_menu(toplevel->base.desktop,
dsurface, seat, x, y);
}
@@ -366,6 +373,13 @@ weston_desktop_xdg_toplevel_protocol_move(struct wl_client *wl_client,
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ if (!toplevel->base.configured) {
+ wl_resource_post_error(toplevel->resource,
+ ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+ "Surface has not been configured yet");
+ return;
+ }
+
weston_desktop_api_move(toplevel->base.desktop, dsurface, seat, serial);
}
@@ -383,6 +397,13 @@ weston_desktop_xdg_toplevel_protocol_resize(struct wl_client *wl_client,
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ if (!toplevel->base.configured) {
+ wl_resource_post_error(toplevel->resource,
+ ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
+ "Surface has not been configured yet");
+ return;
+ }
+
weston_desktop_api_resize(toplevel->base.desktop,
dsurface, seat, serial, edges);
}
commit 3d7e60798a23026d9397d5cff56127917998e78a
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Sun Sep 11 11:29:23 2016 +0200
libweston-desktop/xdg_shell_v6: Add surface as needed
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index 70e9132..fbf3e69 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -284,6 +284,18 @@ static void
weston_desktop_xdg_surface_schedule_configure(struct weston_desktop_xdg_surface *surface);
static void
+weston_desktop_xdg_toplevel_ensure_added(struct weston_desktop_xdg_toplevel *toplevel)
+{
+ if (toplevel->added)
+ return;
+
+ weston_desktop_api_surface_added(toplevel->base.desktop,
+ toplevel->base.desktop_surface);
+ weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
+ toplevel->added = true;
+}
+
+static void
weston_desktop_xdg_toplevel_protocol_set_parent(struct wl_client *wl_client,
struct wl_resource *resource,
struct wl_resource *parent_resource)
@@ -296,6 +308,8 @@ weston_desktop_xdg_toplevel_protocol_set_parent(struct wl_client *wl_client,
if (parent_resource != NULL)
parent = wl_resource_get_user_data(parent_resource);
+
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_set_parent(toplevel->base.desktop, dsurface, parent);
}
@@ -416,6 +430,7 @@ weston_desktop_xdg_toplevel_protocol_set_maximized(struct wl_client *wl_client,
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_maximized_requested(toplevel->base.desktop, dsurface, true);
}
@@ -428,6 +443,7 @@ weston_desktop_xdg_toplevel_protocol_unset_maximized(struct wl_client *wl_client
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_maximized_requested(toplevel->base.desktop, dsurface, false);
}
@@ -445,6 +461,7 @@ weston_desktop_xdg_toplevel_protocol_set_fullscreen(struct wl_client *wl_client,
if (output_resource != NULL)
output = wl_resource_get_user_data(output_resource);
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_fullscreen_requested(toplevel->base.desktop, dsurface,
true, output);
}
@@ -458,6 +475,7 @@ weston_desktop_xdg_toplevel_protocol_unset_fullscreen(struct wl_client *wl_clien
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_fullscreen_requested(toplevel->base.desktop, dsurface,
false, NULL);
}
@@ -471,6 +489,7 @@ weston_desktop_xdg_toplevel_protocol_set_minimized(struct wl_client *wl_client,
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
weston_desktop_api_minimized_requested(toplevel->base.desktop, dsurface);
}
@@ -584,10 +603,7 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
bool reconfigure = false;
if (!wsurface->buffer_ref.buffer && !toplevel->added) {
- weston_desktop_api_surface_added(toplevel->base.desktop,
- toplevel->base.desktop_surface);
- weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
- toplevel->added = true;
+ weston_desktop_xdg_toplevel_ensure_added(toplevel);
return;
}
if (!wsurface->buffer_ref.buffer)
commit e30b5fb2e7596dc033218d15e513a7c0ba182fc5
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Fri Sep 9 19:53:38 2016 +0200
Revert "terminal: Fix crash due to race condition in init"
This reverts commit 5c611d933f60f720db98331c9c1c6ed4420f9782.
diff --git a/clients/terminal.c b/clients/terminal.c
index 34bc2c9..6257cb7 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2976,7 +2976,6 @@ terminal_create(struct display *display)
cairo_surface_destroy(surface);
terminal_resize(terminal, 20, 5); /* Set minimum size first */
- terminal_resize_cells(terminal, 20, 5);
terminal_resize(terminal, 80, 25);
wl_list_insert(terminal_list.prev, &terminal->link);
commit 6967f0e2d25adca0a486404409aed18f51a6010c
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Thu Aug 18 15:51:38 2016 +0200
libweston-desktop/xdg_shell_v5: Add surface as needed
This way we are sure the compositor is aware of a surface when we
forward a request for said surface.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
index f8943ab..83e5d30 100644
--- a/libweston-desktop/xdg-shell-v5.c
+++ b/libweston-desktop/xdg-shell-v5.c
@@ -43,6 +43,7 @@ struct weston_desktop_xdg_surface {
struct wl_resource *resource;
struct weston_desktop_surface *surface;
struct weston_desktop *desktop;
+ bool added;
struct wl_event_source *add_idle;
struct wl_event_source *configure_idle;
uint32_t configure_serial;
@@ -66,6 +67,19 @@ struct weston_desktop_xdg_popup {
};
static void
+weston_desktop_xdg_surface_ensure_added(struct weston_desktop_xdg_surface *surface)
+{
+ if (surface->added)
+ return;
+
+ if (surface->add_idle != NULL)
+ wl_event_source_remove(surface->add_idle);
+ surface->add_idle = NULL;
+ weston_desktop_api_surface_added(surface->desktop, surface->surface);
+ surface->added = true;
+}
+
+static void
weston_desktop_xdg_surface_send_configure(void *data)
{
struct weston_desktop_xdg_surface *surface = data;
@@ -210,12 +224,7 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
surface->next_geometry);
}
- if (surface->add_idle != NULL) {
- wl_event_source_remove(surface->add_idle);
- surface->add_idle = NULL;
- weston_desktop_api_surface_added(surface->desktop,
- surface->surface);
- }
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_committed(surface->desktop, surface->surface,
sx, sy);
}
@@ -283,7 +292,9 @@ weston_desktop_xdg_surface_destroy(struct weston_desktop_surface *dsurface,
{
struct weston_desktop_xdg_surface *surface = user_data;
- weston_desktop_api_surface_removed(surface->desktop, surface->surface);
+ if (surface->added)
+ weston_desktop_api_surface_removed(surface->desktop,
+ surface->surface);
if (surface->add_idle != NULL)
wl_event_source_remove(surface->add_idle);
@@ -307,6 +318,8 @@ weston_desktop_xdg_surface_protocol_set_parent(struct wl_client *wl_client,
if (parent_resource != NULL)
parent = wl_resource_get_user_data(parent_resource);
+
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_set_parent(surface->desktop, dsurface, parent);
}
@@ -346,6 +359,7 @@ weston_desktop_xdg_surface_protocol_show_window_menu(struct wl_client *wl_client
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_show_window_menu(surface->desktop, dsurface, seat, x, y);
}
@@ -362,6 +376,7 @@ weston_desktop_xdg_surface_protocol_move(struct wl_client *wl_client,
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_move(surface->desktop, dsurface, seat, serial);
}
@@ -379,6 +394,7 @@ weston_desktop_xdg_surface_protocol_resize(struct wl_client *wl_client,
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, edges);
}
@@ -425,6 +441,7 @@ weston_desktop_xdg_surface_protocol_set_maximized(struct wl_client *wl_client,
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_maximized_requested(surface->desktop, dsurface, true);
}
@@ -437,6 +454,7 @@ weston_desktop_xdg_surface_protocol_unset_maximized(struct wl_client *wl_client,
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_maximized_requested(surface->desktop, dsurface, false);
}
@@ -454,6 +472,7 @@ weston_desktop_xdg_surface_protocol_set_fullscreen(struct wl_client *wl_client,
if (output_resource != NULL)
output = wl_resource_get_user_data(output_resource);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_fullscreen_requested(surface->desktop, dsurface,
true, output);
}
@@ -467,6 +486,7 @@ weston_desktop_xdg_surface_protocol_unset_fullscreen(struct wl_client *wl_client
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_fullscreen_requested(surface->desktop, dsurface,
false, NULL);
}
@@ -480,6 +500,7 @@ weston_desktop_xdg_surface_protocol_set_minimized(struct wl_client *wl_client,
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
+ weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_minimized_requested(surface->desktop, dsurface);
}
@@ -578,11 +599,12 @@ weston_desktop_xdg_shell_protocol_use_unstable_version(struct wl_client *wl_clie
}
static void
-weston_desktop_xdg_surface_add(void *user_data)
+weston_desktop_xdg_surface_add_idle_callback(void *user_data)
{
struct weston_desktop_xdg_surface *surface = user_data;
+
surface->add_idle = NULL;
- weston_desktop_api_surface_added(surface->desktop, surface->surface);
+ weston_desktop_xdg_surface_ensure_added(surface);
}
static void
@@ -632,7 +654,7 @@ weston_desktop_xdg_shell_protocol_get_xdg_surface(struct wl_client *wl_client,
surface->add_idle =
wl_event_loop_add_idle(loop,
- weston_desktop_xdg_surface_add,
+ weston_desktop_xdg_surface_add_idle_callback,
surface);
}
commit 920cf048f36b1aa5bb121de809ac37b900baf3e0
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Tue Aug 16 14:26:20 2016 +0200
desktop-shell: Add back the saved position and rotation for fullscreen/maximized
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 35dbbaa..a43c2e2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1950,14 +1950,13 @@ unset_fullscreen(struct shell_surface *shsurf)
shsurf->saved_x, shsurf->saved_y);
else
weston_view_set_initial_position(shsurf->view, shsurf->shell);
+ shsurf->saved_position_valid = false;
if (shsurf->saved_rotation_valid) {
wl_list_insert(&shsurf->view->geometry.transformation_list,
&shsurf->rotation.transform.link);
shsurf->saved_rotation_valid = false;
}
-
- /* Layer is updated in set_surface_type(). */
}
static void
@@ -1974,14 +1973,13 @@ unset_maximized(struct shell_surface *shsurf)
shsurf->saved_x, shsurf->saved_y);
else
weston_view_set_initial_position(shsurf->view, shsurf->shell);
+ shsurf->saved_position_valid = false;
if (shsurf->saved_rotation_valid) {
wl_list_insert(&shsurf->view->geometry.transformation_list,
&shsurf->rotation.transform.link);
shsurf->saved_rotation_valid = false;
}
-
- /* Layer is updated in set_surface_type(). */
}
static void
@@ -2490,6 +2488,20 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
if (was_maximized)
unset_maximized(shsurf);
+ if ((shsurf->state.fullscreen || shsurf->state.maximized) &&
+ !shsurf->saved_position_valid) {
+ shsurf->saved_x = shsurf->view->geometry.x;
+ shsurf->saved_y = shsurf->view->geometry.y;
+ shsurf->saved_position_valid = true;
+
+ if (!wl_list_empty(&shsurf->rotation.transform.link)) {
+ wl_list_remove(&shsurf->rotation.transform.link);
+ wl_list_init(&shsurf->rotation.transform.link);
+ weston_view_geometry_dirty(shsurf->view);
+ shsurf->saved_rotation_valid = true;
+ }
+ }
+
if (shsurf->state.fullscreen) {
shell_configure_fullscreen(shsurf);
} else if (shsurf->state.maximized) {
commit 18a81acc17f7d8e49db3ab3f4827252114a4899a
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Tue Aug 16 14:26:03 2016 +0200
desktop-shell: Unset fullscreen/maximized state on commit
This only stores the current state, as libweston-desktop is still in
charge of double-buffering it.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 653e85b..35dbbaa 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -129,6 +129,8 @@ struct shell_surface {
struct weston_output *output;
struct surface_state {
+ bool fullscreen;
+ bool maximized;
bool lowered;
} state;
@@ -2404,10 +2406,10 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
struct weston_seat *seat;
/* initial positioning, see also configure() */
- if (weston_desktop_surface_get_fullscreen(shsurf->desktop_surface)) {
+ if (shsurf->state.fullscreen) {
center_on_output(shsurf->view, shsurf->fullscreen_output);
shell_map_fullscreen(shsurf);
- } else if (weston_desktop_surface_get_maximized(shsurf->desktop_surface)) {
+ } else if (shsurf->state.maximized) {
set_maximized_position(shell, shsurf);
} else {
weston_view_set_initial_position(shsurf->view, shell);
@@ -2418,7 +2420,7 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
weston_view_update_transform(shsurf->view);
shsurf->view->is_mapped = true;
- if (weston_desktop_surface_get_maximized(shsurf->desktop_surface)) {
+ if (shsurf->state.maximized) {
surface->output = shsurf->output;
shsurf->view->output = shsurf->output;
}
@@ -2429,8 +2431,7 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf,
WESTON_ACTIVATE_FLAG_CONFIGURE);
}
- if (!weston_desktop_surface_get_maximized(shsurf->desktop_surface) &&
- !weston_desktop_surface_get_fullscreen(shsurf->desktop_surface)) {
+ if (!shsurf->state.fullscreen && !shsurf->state.maximized) {
switch (shell->win_animation_type) {
case ANIMATION_FADE:
weston_fade_run(shsurf->view, 0.0, 1.0, 300.0, NULL, NULL);
@@ -2455,10 +2456,20 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
weston_desktop_surface_get_surface(desktop_surface);
struct weston_view *view = shsurf->view;
struct desktop_shell *shell = data;
+ bool was_fullscreen;
+ bool was_maximized;
if (surface->width == 0)
return;
+ was_fullscreen = shsurf->state.fullscreen;
+ was_maximized = shsurf->state.maximized;
+
+ shsurf->state.fullscreen =
+ weston_desktop_surface_get_fullscreen(desktop_surface);
+ shsurf->state.maximized =
+ weston_desktop_surface_get_maximized(desktop_surface);
+
if (!weston_surface_is_mapped(surface)) {
map(shell, shsurf, sx, sy);
surface->is_mapped = true;
@@ -2469,12 +2480,19 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
if (sx == 0 && sy == 0 &&
shsurf->last_width == surface->width &&
- shsurf->last_height == surface->height)
+ shsurf->last_height == surface->height &&
+ was_fullscreen == shsurf->state.fullscreen &&
+ was_maximized == shsurf->state.maximized)
return;
- if (weston_desktop_surface_get_fullscreen(desktop_surface))
+ if (was_fullscreen)
+ unset_fullscreen(shsurf);
+ if (was_maximized)
+ unset_maximized(shsurf);
+
+ if (shsurf->state.fullscreen) {
shell_configure_fullscreen(shsurf);
- else if (weston_desktop_surface_get_maximized(desktop_surface)) {
+ } else if (shsurf->state.maximized) {
set_maximized_position(shell, shsurf);
surface->output = shsurf->output;
} else {
@@ -2531,8 +2549,6 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen,
width = shsurf->output->width;
height = shsurf->output->height;
- } else {
- unset_fullscreen(shsurf);
}
weston_desktop_surface_set_fullscreen(desktop_surface, fullscreen);
weston_desktop_surface_set_size(desktop_surface, width, height);
@@ -2632,8 +2648,6 @@ set_maximized(struct shell_surface *shsurf, bool maximized)
width = area.width;
height = area.height;
- } else {
- unset_maximized(shsurf);
}
weston_desktop_surface_set_maximized(desktop_surface, maximized);
weston_desktop_surface_set_size(desktop_surface, width, height);
commit 631560790e260d40ba3d81c2b0b042fa89a080b1
Author: Bryce Harrington <bryce@osg.samsung.com>
Date: Tue Sep 6 14:47:33 2016 -0700
configure.ac: bump to version 1.11.93 for the RC1 release
diff --git a/configure.ac b/configure.ac
index 3d4b700..076b336 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
m4_define([weston_major_version], [1])
m4_define([weston_minor_version], [11])
-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])
m4_define([libweston_major_version], [1])
m4_define([libweston_minor_version], [11])
-m4_define([libweston_patch_version], [92])
+m4_define([libweston_patch_version], [93])
AC_PREREQ([2.64])
AC_INIT([weston],
commit 85571a300206efbffdd12f550f1dbc2d59ac005e
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date: Thu Sep 1 15:19:46 2016 +0100
compositor-wayland: Only destroy the egl_window when using GLES.
This prevents a segfault when unplugging an output when using pixman.
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
index 7c12b4c..c223baa 100644
--- a/libweston/compositor-wayland.c
+++ b/libweston/compositor-wayland.c
@@ -627,9 +627,9 @@ wayland_output_destroy(struct weston_output *output_base)
pixman_renderer_output_destroy(output_base);
} else {
gl_renderer->output_destroy(output_base);
+ wl_egl_window_destroy(output->gl.egl_window);
}
- wl_egl_window_destroy(output->gl.egl_window);
wl_surface_destroy(output->parent.surface);
if (output->parent.shell_surface)
wl_shell_surface_destroy(output->parent.shell_surface);
commit 1714f01e0cfcc6b71946d5c8d9898a2eaba86fac
Author: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Thu Aug 18 16:45:30 2016 +0200
libweston-desktop/xwayland: Do not over-destroy the view
With this weston_view_destroy() call, Xwayland popups make Weston freeze
in a busy-loop (probably corrupted wl_list).
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
index cb08323..bd68bc6 100644
--- a/libweston-desktop/xwayland.c
+++ b/libweston-desktop/xwayland.c
@@ -152,13 +152,11 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface,
wl_list_remove(&surface->resource_destroy_listener.link);
weston_desktop_surface_unset_relative_to(surface->surface);
- if (surface->added) {
+ if (surface->added)
weston_desktop_api_surface_removed(surface->desktop,
surface->surface);
- } else if (surface->state == XWAYLAND) {
+ else if (surface->state == XWAYLAND)
weston_desktop_surface_unlink_view(surface->view);
- weston_view_destroy(surface->view);
- }
free(surface);
}
commit 5c611d933f60f720db98331c9c1c6ed4420f9782
Author: Bryce Harrington <bryce@osg.samsung.com>
Date: Mon Aug 29 16:28:08 2016 -0700
terminal: Fix crash due to race condition in init
weston-terminal intermittently crashes on startup. This occurs because
some parameters in the weston_terminal structure such as data_pitch,
don't get set to non-zero until the resize_handler() callback gets
triggered. That callback makes a call to terminal_resize_cells(), to
calculate the proper values for these parameters.
Reply to: