diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-01 11:08:40 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-01 12:16:21 +0000 |
commit | 03c549e0392f92c02536d3f86d5e1d8dfa3435ac (patch) | |
tree | fe49d170a929b34ba82cd10db1a0bd8e3760fa4b /chromium/third_party/weston | |
parent | 5d013f5804a0d91fcf6c626b2d6fb6eca5c845b0 (diff) | |
download | qtwebengine-chromium-03c549e0392f92c02536d3f86d5e1d8dfa3435ac.tar.gz |
BASELINE: Update Chromium to 91.0.4472.160
Change-Id: I0def1f08a2412aeed79a9ab95dd50eb5c3f65f31
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/weston')
8 files changed, 61 insertions, 3 deletions
diff --git a/chromium/third_party/weston/BUILD.gn b/chromium/third_party/weston/BUILD.gn index 661c14d5715..3db14dd6978 100644 --- a/chromium/third_party/weston/BUILD.gn +++ b/chromium/third_party/weston/BUILD.gn @@ -392,6 +392,7 @@ shared_library("weston_test") { deps = [ ":compositor", ":libweston", + ":libweston_desktop", "//third_party/wayland-protocols:weston_test", ] diff --git a/chromium/third_party/weston/README.chromium b/chromium/third_party/weston/README.chromium index 1504adf0b82..0d64c846dc5 100644 --- a/chromium/third_party/weston/README.chromium +++ b/chromium/third_party/weston/README.chromium @@ -14,8 +14,17 @@ This code is only for running tests of Chromium for Wayland and is not compiled into Chrome --[ UPDATING ] ----------------- -To update, change the commit hash with the most recent hash as mentioned on -the official repo inside the DEPS file. +Chromium infrastructure has a mirror of the Weston's official gitlab +repository, but the mirror is set up in such a way that it is possible to +maintain branches of Weston with additional patches applied (which +should be submitted into upstream). + +Thus, before updating DEPS, one has to request one of the maintainers of +//third_party/weston to create a branch out of a new remote branch +(for example, if the remote has a new tag 10.0.0 that is created out of +10.0 branch, a new 10.0 branch needs to be created) and ask to rebase +patches for that new branch. Once the changes are pushed, change the commit +hash with the hash pointing to the submitted patches inside the DEPS file. You need to have clang (//third_party/llvm-build/Release+Asserts/bin), and meson (https://github.com/mesonbuild/meson/releases) in your path. Then do gclient sync which will align your local Weston folder with the most diff --git a/chromium/third_party/weston/generate_configs.py b/chromium/third_party/weston/generate_configs.py index b611ffc8150..cbe85b057e1 100755 --- a/chromium/third_party/weston/generate_configs.py +++ b/chromium/third_party/weston/generate_configs.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/chromium/third_party/weston/src/desktop-shell/shell.c b/chromium/third_party/weston/src/desktop-shell/shell.c index c1c126e8184..673dbce32aa 100644 --- a/chromium/third_party/weston/src/desktop-shell/shell.c +++ b/chromium/third_party/weston/src/desktop-shell/shell.c @@ -2951,6 +2951,15 @@ desktop_surface_pong(struct weston_desktop_client *desktop_client, } static void +desktop_surface_get_geometry(struct weston_desktop_surface *surface, struct weston_geometry *geometry) { + struct shell_surface *shsurf = weston_desktop_surface_get_user_data(surface); + if (shsurf) { + geometry->x = shsurf->view->geometry.x; + geometry->y = shsurf->view->geometry.y; + } +} + +static void desktop_surface_set_xwayland_position(struct weston_desktop_surface *surface, int32_t x, int32_t y, void *shell_) { @@ -2975,6 +2984,7 @@ static const struct weston_desktop_api shell_desktop_api = { .minimized_requested = desktop_surface_minimized_requested, .ping_timeout = desktop_surface_ping_timeout, .pong = desktop_surface_pong, + .get_desktop_surface_root_geometry = desktop_surface_get_geometry, .set_xwayland_position = desktop_surface_set_xwayland_position, }; diff --git a/chromium/third_party/weston/src/include/libweston-desktop/libweston-desktop.h b/chromium/third_party/weston/src/include/libweston-desktop/libweston-desktop.h index 3e7ac738e98..ae05c6f1d76 100644 --- a/chromium/third_party/weston/src/include/libweston-desktop/libweston-desktop.h +++ b/chromium/third_party/weston/src/include/libweston-desktop/libweston-desktop.h @@ -80,6 +80,8 @@ struct weston_desktop_api { bool maximized, void *user_data); void (*minimized_requested)(struct weston_desktop_surface *surface, void *user_data); + void (*get_desktop_surface_root_geometry)(struct weston_desktop_surface *surface, + struct weston_geometry *geometry); /** Position suggestion for an Xwayland window * @@ -167,6 +169,9 @@ weston_desktop_surface_close(struct weston_desktop_surface *surface); void weston_desktop_surface_add_metadata_listener(struct weston_desktop_surface *surface, struct wl_listener *listener); +void +weston_desktop_surface_get_root_geometry(struct weston_desktop_surface *surface, + struct weston_geometry *geometry); void * weston_desktop_surface_get_user_data(struct weston_desktop_surface *surface); diff --git a/chromium/third_party/weston/src/libweston-desktop/internal.h b/chromium/third_party/weston/src/libweston-desktop/internal.h index e4ab2701b8b..af22e90047b 100644 --- a/chromium/third_party/weston/src/libweston-desktop/internal.h +++ b/chromium/third_party/weston/src/libweston-desktop/internal.h @@ -85,6 +85,10 @@ void weston_desktop_api_set_xwayland_position(struct weston_desktop *desktop, struct weston_desktop_surface *surface, int32_t x, int32_t y); +void +weston_desktop_api_get_desktop_surface_root_geometry(struct weston_desktop *desktop, + struct weston_desktop_surface *surface, + struct weston_geometry *geometry); struct weston_desktop_seat * weston_desktop_seat_from_seat(struct weston_seat *wseat); diff --git a/chromium/third_party/weston/src/libweston-desktop/libweston-desktop.c b/chromium/third_party/weston/src/libweston-desktop/libweston-desktop.c index d92958d4cd9..fe74c5438ff 100644 --- a/chromium/third_party/weston/src/libweston-desktop/libweston-desktop.c +++ b/chromium/third_party/weston/src/libweston-desktop/libweston-desktop.c @@ -252,3 +252,11 @@ weston_desktop_api_set_xwayland_position(struct weston_desktop *desktop, desktop->api.set_xwayland_position(surface, x, y, desktop->user_data); } + +void +weston_desktop_api_get_desktop_surface_root_geometry(struct weston_desktop *desktop, + struct weston_desktop_surface *surface, + struct weston_geometry *geometry) { + if (desktop->api.get_desktop_surface_root_geometry != NULL) + desktop->api.get_desktop_surface_root_geometry(surface, geometry); +} diff --git a/chromium/third_party/weston/src/libweston-desktop/surface.c b/chromium/third_party/weston/src/libweston-desktop/surface.c index 433f08aefb1..1d0a0637abc 100644 --- a/chromium/third_party/weston/src/libweston-desktop/surface.c +++ b/chromium/third_party/weston/src/libweston-desktop/surface.c @@ -521,6 +521,27 @@ weston_desktop_surface_add_metadata_listener(struct weston_desktop_surface *surf wl_signal_add(&surface->metadata_signal, listener); } +WL_EXPORT void +weston_desktop_surface_get_root_geometry(struct weston_desktop_surface *surface, + struct weston_geometry *geometry) { + struct shell_surface *shsurf = + weston_desktop_surface_get_user_data(surface); + if (!shsurf) { + geometry->x = surface->position.x; + geometry->y = surface->position.y; + if (surface->parent) { + struct weston_geometry parent_geometry; + weston_desktop_api_get_desktop_surface_root_geometry( + surface->parent->desktop, surface->parent, + &parent_geometry); + geometry->x = parent_geometry.x + geometry->x; + geometry->y = parent_geometry.y + geometry->y; + } + return; + } + weston_desktop_api_get_desktop_surface_root_geometry(surface->desktop, surface, geometry); +} + struct weston_desktop_surface * weston_desktop_surface_from_client_link(struct wl_list *link) { |