Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
742ad74bc0 | ||
![]() |
263702cf7d | ||
![]() |
38eb0a96e0 | ||
![]() |
a5d52075a0 | ||
![]() |
78852bd350 | ||
![]() |
a627a4be50 | ||
![]() |
072c56723c | ||
![]() |
21e46364c0 | ||
![]() |
0bd68d9ad6 | ||
![]() |
ff13a90eea | ||
![]() |
5ad870f505 | ||
![]() |
2d66d01cf5 | ||
![]() |
d5a3ec5e58 | ||
![]() |
df70b81ed7 | ||
![]() |
7047926834 | ||
![]() |
0849a9b3c8 | ||
![]() |
597437a096 | ||
![]() |
eaa777b914 | ||
![]() |
17f5a44f3b | ||
![]() |
0ba5b694d3 | ||
![]() |
783b144f2e | ||
![]() |
995fb60fde | ||
![]() |
f5fafa05fc | ||
![]() |
ac05950098 | ||
![]() |
097ed47292 | ||
![]() |
ad7c5162bc | ||
![]() |
e7cf894fa2 | ||
![]() |
72a6929467 | ||
![]() |
7a8392d2fe | ||
![]() |
7678ec9209 | ||
![]() |
5517953ed0 | ||
![]() |
00a78294b1 | ||
![]() |
715eb67cd8 | ||
![]() |
0da83cc1d8 | ||
![]() |
24ee61445c | ||
![]() |
870db9703c | ||
![]() |
cf1ca2c300 |
@ -385,6 +385,7 @@ weston_client_launch(struct weston_compositor *compositor,
|
||||
sigset_t allsigs;
|
||||
pid_t pid;
|
||||
bool ret;
|
||||
size_t written __attribute__((unused));
|
||||
|
||||
weston_log("launching '%s'\n", path);
|
||||
str_printf(&fail_exec, "Error: Couldn't launch client '%s'\n", path);
|
||||
@ -424,22 +425,23 @@ weston_client_launch(struct weston_compositor *compositor,
|
||||
|
||||
/* Launch clients as the user. Do not launch clients with wrong euid. */
|
||||
if (seteuid(getuid()) == -1) {
|
||||
write(STDERR_FILENO, fail_seteuid,
|
||||
strlen(fail_seteuid));
|
||||
written = write(STDERR_FILENO, fail_seteuid,
|
||||
strlen(fail_seteuid));
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ret = fdstr_clear_cloexec_fd1(&wayland_socket);
|
||||
if (!ret) {
|
||||
write(STDERR_FILENO, fail_cloexec,
|
||||
strlen(fail_cloexec));
|
||||
written = write(STDERR_FILENO, fail_cloexec,
|
||||
strlen(fail_cloexec));
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
execve(argp[0], argp, envp);
|
||||
|
||||
if (fail_exec)
|
||||
write(STDERR_FILENO, fail_exec, strlen(fail_exec));
|
||||
written = write(STDERR_FILENO, fail_exec,
|
||||
strlen(fail_exec));
|
||||
_exit(EXIT_FAILURE);
|
||||
|
||||
default:
|
||||
@ -2051,7 +2053,8 @@ drm_backend_output_configure(struct weston_output *output,
|
||||
enum weston_drm_backend_output_mode mode =
|
||||
WESTON_DRM_BACKEND_OUTPUT_PREFERRED;
|
||||
uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
||||
uint32_t max_bpc;
|
||||
uint32_t max_bpc = 0;
|
||||
bool max_bpc_specified = false;
|
||||
char *s;
|
||||
char *modeline = NULL;
|
||||
char *gbm_format = NULL;
|
||||
@ -2063,16 +2066,19 @@ drm_backend_output_configure(struct weston_output *output,
|
||||
return -1;
|
||||
}
|
||||
|
||||
weston_config_section_get_uint(section, "max-bpc", &max_bpc, 16);
|
||||
api->set_max_bpc(output, max_bpc);
|
||||
|
||||
weston_config_section_get_string(section, "mode", &s, "preferred");
|
||||
if (weston_config_section_get_uint(section, "max-bpc", &max_bpc, 16) == 0)
|
||||
max_bpc_specified = true;
|
||||
|
||||
if (strcmp(s, "off") == 0) {
|
||||
assert(0 && "off was supposed to be pruned");
|
||||
return -1;
|
||||
} else if (wet->drm_use_current_mode || strcmp(s, "current") == 0) {
|
||||
mode = WESTON_DRM_BACKEND_OUTPUT_CURRENT;
|
||||
/* If mode=current and no max-bpc was specfied on the .ini file,
|
||||
use current max_bpc so full modeset is not done. */
|
||||
if (!max_bpc_specified)
|
||||
max_bpc = 0;
|
||||
} else if (strcmp(s, "preferred") != 0) {
|
||||
modeline = s;
|
||||
s = NULL;
|
||||
@ -2086,6 +2092,8 @@ drm_backend_output_configure(struct weston_output *output,
|
||||
}
|
||||
free(modeline);
|
||||
|
||||
api->set_max_bpc(output, max_bpc);
|
||||
|
||||
if (count_remaining_heads(output, NULL) == 1) {
|
||||
struct weston_head *head = weston_output_get_first_head(output);
|
||||
transform = weston_head_get_transform(head);
|
||||
|
@ -110,6 +110,7 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd
|
||||
char *const *envp;
|
||||
char *const *argp;
|
||||
bool ret;
|
||||
size_t written __attribute__ ((unused));
|
||||
|
||||
if (os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, wayland_socket.fds) < 0) {
|
||||
weston_log("wl connection socketpair failed\n");
|
||||
@ -174,8 +175,8 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd
|
||||
/* execve does not return on success, so it failed */
|
||||
|
||||
if (exec_failure_msg) {
|
||||
write(STDERR_FILENO, exec_failure_msg,
|
||||
strlen(exec_failure_msg));
|
||||
written = write(STDERR_FILENO, exec_failure_msg,
|
||||
strlen(exec_failure_msg));
|
||||
}
|
||||
|
||||
_exit(EXIT_FAILURE);
|
||||
|
@ -1153,7 +1153,7 @@ resize_grab_motion(struct weston_pointer_grab *grab,
|
||||
|
||||
weston_pointer_move(pointer, event);
|
||||
|
||||
if (!shsurf)
|
||||
if (!shsurf || !shsurf->desktop_surface)
|
||||
return;
|
||||
|
||||
weston_view_from_global_fixed(shsurf->view,
|
||||
@ -1204,11 +1204,12 @@ resize_grab_button(struct weston_pointer_grab *grab,
|
||||
|
||||
if (pointer->button_count == 0 &&
|
||||
state == WL_POINTER_BUTTON_STATE_RELEASED) {
|
||||
if (resize->base.shsurf != NULL) {
|
||||
if (resize->base.shsurf && resize->base.shsurf->desktop_surface) {
|
||||
struct weston_desktop_surface *desktop_surface =
|
||||
resize->base.shsurf->desktop_surface;
|
||||
weston_desktop_surface_set_resizing(desktop_surface,
|
||||
false);
|
||||
weston_desktop_surface_set_size(desktop_surface, 0, 0);
|
||||
}
|
||||
|
||||
shell_grab_end(&resize->base);
|
||||
@ -1221,10 +1222,11 @@ resize_grab_cancel(struct weston_pointer_grab *grab)
|
||||
{
|
||||
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
|
||||
|
||||
if (resize->base.shsurf != NULL) {
|
||||
if (resize->base.shsurf && resize->base.shsurf->desktop_surface) {
|
||||
struct weston_desktop_surface *desktop_surface =
|
||||
resize->base.shsurf->desktop_surface;
|
||||
weston_desktop_surface_set_resizing(desktop_surface, false);
|
||||
weston_desktop_surface_set_size(desktop_surface, 0, 0);
|
||||
}
|
||||
|
||||
shell_grab_end(&resize->base);
|
||||
|
@ -759,7 +759,7 @@ WARN_NO_PARAMDOC = NO
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = YES
|
||||
WARN_AS_ERROR = @MESON_WERROR@
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
|
@ -39,6 +39,7 @@ sphinx_conf = configure_file(
|
||||
doxy_conf_data = configuration_data()
|
||||
doxy_conf_data.set('SRC_ROOT', meson.source_root())
|
||||
doxy_conf_data.set('OUTPUT_DIR', doxygen_database)
|
||||
doxy_conf_data.set('MESON_WERROR', get_option('werror') == true ? 'YES' : 'NO')
|
||||
doxygen_conf_weston = configure_file(
|
||||
input: 'doxygen.ini.in',
|
||||
output: 'doxygen.ini',
|
||||
|
@ -84,7 +84,8 @@ struct weston_drm_output_api {
|
||||
* The property is used for working around faulty sink hardware like
|
||||
* monitors or media converters that mishandle the kernel driver
|
||||
* chosen bits-per-channel on the physical link. When having trouble,
|
||||
* try a lower value like 8.
|
||||
* try a lower value like 8. A value of 0 means that the current max
|
||||
* bpc will be reprogrammed.
|
||||
*
|
||||
* The value actually used in KMS is silently clamped to the range the
|
||||
* KMS driver claims to support. The default value is 16.
|
||||
|
@ -1452,6 +1452,7 @@ struct weston_view {
|
||||
struct weston_surface *surface;
|
||||
struct wl_list surface_link;
|
||||
struct wl_signal destroy_signal;
|
||||
struct wl_signal unmap_signal;
|
||||
|
||||
/* struct weston_paint_node::view_link */
|
||||
struct wl_list paint_node_list;
|
||||
@ -1605,7 +1606,7 @@ struct weston_pointer_constraint {
|
||||
bool hint_is_pending;
|
||||
|
||||
struct wl_listener pointer_destroy_listener;
|
||||
struct wl_listener surface_destroy_listener;
|
||||
struct wl_listener view_unmap_listener;
|
||||
struct wl_listener surface_commit_listener;
|
||||
struct wl_listener surface_activate_listener;
|
||||
};
|
||||
|
@ -738,6 +738,8 @@ hmi_controller_destroy(struct wl_listener *listener, void *data)
|
||||
struct hmi_controller *hmi_ctrl =
|
||||
container_of(listener, struct hmi_controller, destroy_listener);
|
||||
|
||||
wl_list_remove(&hmi_ctrl->destroy_listener.link);
|
||||
|
||||
wl_list_for_each_safe(link, next,
|
||||
&hmi_ctrl->workspace_fade.layer_list, link) {
|
||||
wl_list_remove(&link->link);
|
||||
|
@ -1192,15 +1192,14 @@ ivi_layout_get_layers_under_surface(struct ivi_layout_surface *ivisurf,
|
||||
else
|
||||
length--;
|
||||
}
|
||||
if (length == 0) {
|
||||
free(*ppArray);
|
||||
*ppArray = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
*pLength = length;
|
||||
|
||||
if (!length) {
|
||||
free(*ppArray);
|
||||
*ppArray = NULL;
|
||||
}
|
||||
|
||||
return IVI_SUCCEEDED;
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,6 @@ shell_destroy(struct wl_listener *listener, void *data)
|
||||
wl_list_remove(&shell->destroy_listener.link);
|
||||
wl_list_remove(&shell->wake_listener.link);
|
||||
|
||||
weston_desktop_destroy(shell->desktop);
|
||||
|
||||
wl_list_for_each_safe(ivisurf, next, &shell->ivi_surface_list, link) {
|
||||
if (ivisurf->layout_surface != NULL)
|
||||
@ -357,6 +356,7 @@ shell_destroy(struct wl_listener *listener, void *data)
|
||||
|
||||
ivi_layout_fini();
|
||||
|
||||
weston_desktop_destroy(shell->desktop);
|
||||
free(shell);
|
||||
}
|
||||
|
||||
@ -507,6 +507,8 @@ desktop_surface_added(struct weston_desktop_surface *surface,
|
||||
ivisurf->layout_surface = layout_surface;
|
||||
ivisurf->surface = weston_surf;
|
||||
|
||||
wl_list_insert(&shell->ivi_surface_list, &ivisurf->link);
|
||||
|
||||
weston_desktop_surface_set_user_data(surface, ivisurf);
|
||||
}
|
||||
|
||||
@ -519,8 +521,14 @@ desktop_surface_removed(struct weston_desktop_surface *surface,
|
||||
|
||||
assert(ivisurf != NULL);
|
||||
|
||||
weston_desktop_surface_set_user_data(surface, NULL);
|
||||
|
||||
if (ivisurf->layout_surface)
|
||||
layout_surface_cleanup(ivisurf);
|
||||
|
||||
wl_list_remove(&ivisurf->link);
|
||||
|
||||
free(ivisurf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -413,6 +413,7 @@ kiosk_shell_surface_activate(struct kiosk_shell_surface *shsurf,
|
||||
weston_layer_entry_insert(&shsurf->shell->normal_layer.view_list,
|
||||
&shsurf->view->layer_link);
|
||||
weston_view_geometry_dirty(shsurf->view);
|
||||
weston_view_update_transform(shsurf->view);
|
||||
weston_surface_damage(shsurf->view->surface);
|
||||
}
|
||||
|
||||
@ -1068,13 +1069,13 @@ kiosk_shell_add_bindings(struct kiosk_shell *shell)
|
||||
|
||||
mod = weston_shell_get_binding_modifier(shell->config, MODIFIER_SUPER);
|
||||
|
||||
weston_compositor_add_button_binding(shell->compositor, BTN_LEFT, mod,
|
||||
weston_compositor_add_button_binding(shell->compositor, BTN_LEFT, 0,
|
||||
kiosk_shell_click_to_activate_binding,
|
||||
shell);
|
||||
weston_compositor_add_button_binding(shell->compositor, BTN_RIGHT, mod,
|
||||
weston_compositor_add_button_binding(shell->compositor, BTN_RIGHT, 0,
|
||||
kiosk_shell_click_to_activate_binding,
|
||||
shell);
|
||||
weston_compositor_add_touch_binding(shell->compositor, mod,
|
||||
weston_compositor_add_touch_binding(shell->compositor, 0,
|
||||
kiosk_shell_touch_to_activate_binding,
|
||||
shell);
|
||||
|
||||
|
@ -517,7 +517,11 @@ struct drm_head {
|
||||
struct backlight *backlight;
|
||||
|
||||
drmModeModeInfo inherited_mode; /**< Original mode on the connector */
|
||||
uint32_t inherited_max_bpc; /**< Original max_bpc on the connector */
|
||||
uint32_t inherited_crtc_id; /**< Original CRTC assignment */
|
||||
|
||||
/* drm_output::disable_head */
|
||||
struct wl_list disable_head_link;
|
||||
};
|
||||
|
||||
struct drm_crtc {
|
||||
@ -540,6 +544,9 @@ struct drm_output {
|
||||
struct drm_device *device;
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
/* drm_head::disable_head_link */
|
||||
struct wl_list disable_head;
|
||||
|
||||
bool page_flip_pending;
|
||||
bool atomic_complete_pending;
|
||||
bool destroy_pending;
|
||||
|
@ -81,6 +81,20 @@ drm_virtual_crtc_destroy(struct drm_crtc *crtc)
|
||||
free(crtc);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
get_drm_plane_index_maximum(struct drm_device *device)
|
||||
{
|
||||
uint32_t max = 0;
|
||||
struct drm_plane *p;
|
||||
|
||||
wl_list_for_each(p, &device->plane_list, link) {
|
||||
if (p->plane_idx > max)
|
||||
max = p->plane_idx;
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a drm_plane for virtual output
|
||||
*
|
||||
@ -125,6 +139,7 @@ drm_virtual_plane_create(struct drm_device *device, struct drm_output *output)
|
||||
goto err;
|
||||
|
||||
weston_plane_init(&plane->base, b->compositor, 0, 0);
|
||||
plane->plane_idx = get_drm_plane_index_maximum(device) + 1;
|
||||
wl_list_insert(&device->plane_list, &plane->link);
|
||||
|
||||
return plane;
|
||||
|
@ -1299,10 +1299,14 @@ drm_output_attach_head(struct weston_output *output_base,
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(output_base->compositor);
|
||||
struct drm_device *device = b->drm;
|
||||
struct drm_head *head = to_drm_head(head_base);
|
||||
|
||||
if (wl_list_length(&output_base->head_list) >= MAX_CLONED_CONNECTORS)
|
||||
return -1;
|
||||
|
||||
wl_list_remove(&head->disable_head_link);
|
||||
wl_list_init(&head->disable_head_link);
|
||||
|
||||
if (!output_base->enabled)
|
||||
return 0;
|
||||
|
||||
@ -1326,18 +1330,14 @@ static void
|
||||
drm_output_detach_head(struct weston_output *output_base,
|
||||
struct weston_head *head_base)
|
||||
{
|
||||
struct drm_backend *b = to_drm_backend(output_base->compositor);
|
||||
struct drm_device *device = b->drm;
|
||||
struct drm_output *output = to_drm_output(output_base);
|
||||
struct drm_head *head = to_drm_head(head_base);
|
||||
|
||||
if (!output_base->enabled)
|
||||
return;
|
||||
|
||||
/* Need to go through modeset to drop connectors that should no longer
|
||||
* be driven. */
|
||||
/* XXX: Ideally we'd do this per-output, not globally. */
|
||||
device->state_invalid = true;
|
||||
|
||||
weston_output_schedule_repaint(output_base);
|
||||
/* Drop connectors that should no longer be driven on next repaint. */
|
||||
wl_list_insert(&output->disable_head, &head->disable_head_link);
|
||||
}
|
||||
|
||||
int
|
||||
@ -1388,6 +1388,12 @@ drm_head_read_current_setup(struct drm_head *head, struct drm_device *device)
|
||||
drmModeFreeCrtc(crtc);
|
||||
}
|
||||
|
||||
/* Get the current max_bpc that's currently configured to
|
||||
* this connector. */
|
||||
head->inherited_max_bpc = drm_property_get_value(
|
||||
&head->connector.props[WDRM_CONNECTOR_MAX_BPC],
|
||||
head->connector.props_drm, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2243,6 +2249,8 @@ drm_head_create(struct drm_device *device, drmModeConnector *conn,
|
||||
|
||||
head->base.backend_id = drm_head_destroy;
|
||||
|
||||
wl_list_init(&head->disable_head_link);
|
||||
|
||||
ret = drm_head_update_info(head, conn);
|
||||
if (ret < 0)
|
||||
goto err_update;
|
||||
@ -2316,6 +2324,8 @@ drm_output_create(struct weston_compositor *compositor, const char *name)
|
||||
output->device = device;
|
||||
output->crtc = NULL;
|
||||
|
||||
wl_list_init(&output->disable_head);
|
||||
|
||||
output->max_bpc = 16;
|
||||
output->gbm_format = DRM_FORMAT_INVALID;
|
||||
#ifdef BUILD_DRM_GBM
|
||||
|
@ -912,20 +912,29 @@ drm_connector_set_max_bpc(struct drm_connector *connector,
|
||||
drmModeAtomicReq *req)
|
||||
{
|
||||
const struct drm_property_info *info;
|
||||
struct drm_head *head;
|
||||
struct drm_backend *backend = output->device->backend;
|
||||
uint64_t max_bpc;
|
||||
uint64_t a, b;
|
||||
|
||||
if (!drm_connector_has_prop(connector, WDRM_CONNECTOR_MAX_BPC))
|
||||
return 0;
|
||||
|
||||
info = &connector->props[WDRM_CONNECTOR_MAX_BPC];
|
||||
assert(info->flags & DRM_MODE_PROP_RANGE);
|
||||
assert(info->num_range_values == 2);
|
||||
a = info->range_values[0];
|
||||
b = info->range_values[1];
|
||||
assert(a <= b);
|
||||
if (output->max_bpc == 0) {
|
||||
/* A value of 0 means that the current max_bpc must be programmed. */
|
||||
head = drm_head_find_by_connector(backend, connector->connector_id);
|
||||
max_bpc = head->inherited_max_bpc;
|
||||
} else {
|
||||
info = &connector->props[WDRM_CONNECTOR_MAX_BPC];
|
||||
assert(info->flags & DRM_MODE_PROP_RANGE);
|
||||
assert(info->num_range_values == 2);
|
||||
a = info->range_values[0];
|
||||
b = info->range_values[1];
|
||||
assert(a <= b);
|
||||
|
||||
max_bpc = MAX(a, MIN(output->max_bpc, b));
|
||||
}
|
||||
|
||||
max_bpc = MAX(a, MIN(output->max_bpc, b));
|
||||
return connector_add_prop(req, connector,
|
||||
WDRM_CONNECTOR_MAX_BPC, max_bpc);
|
||||
}
|
||||
@ -942,6 +951,7 @@ drm_output_apply_state_atomic(struct drm_output_state *state,
|
||||
struct drm_plane_state *plane_state;
|
||||
struct drm_mode *current_mode = to_drm_mode(output->base.current_mode);
|
||||
struct drm_head *head;
|
||||
struct drm_head *tmp;
|
||||
int ret = 0;
|
||||
|
||||
drm_debug(b, "\t\t[atomic] %s output %lu (%s) state\n",
|
||||
@ -978,6 +988,14 @@ drm_output_apply_state_atomic(struct drm_output_state *state,
|
||||
wl_list_for_each(head, &output->base.head_list, base.output_link)
|
||||
ret |= connector_add_prop(req, &head->connector,
|
||||
WDRM_CONNECTOR_CRTC_ID, 0);
|
||||
|
||||
wl_list_for_each_safe(head, tmp, &output->disable_head,
|
||||
disable_head_link) {
|
||||
ret |= connector_add_prop(req, &head->connector,
|
||||
WDRM_CONNECTOR_CRTC_ID, 0);
|
||||
wl_list_remove(&head->disable_head_link);
|
||||
wl_list_init(&head->disable_head_link);
|
||||
}
|
||||
}
|
||||
|
||||
wl_list_for_each(head, &output->base.head_list, base.output_link) {
|
||||
|
@ -44,7 +44,7 @@ deps_drm = [
|
||||
]
|
||||
|
||||
if get_option('renderer-gl')
|
||||
dep_gbm = dependency('gbm', required: false)
|
||||
dep_gbm = dependency('gbm', required: false, version: '>= 21.1.1')
|
||||
if not dep_gbm.found()
|
||||
error('drm-backend with GL renderer requires gbm which was not found. Or, you can use \'-Drenderer-gl=false\'.')
|
||||
endif
|
||||
|
@ -1111,9 +1111,9 @@ clipboard_data_source_send(struct weston_data_source *base,
|
||||
}
|
||||
} else {
|
||||
source->state = RDP_CLIPBOARD_SOURCE_FAILED;
|
||||
weston_log("RDP %s (%p:%s) specified format \"%s\" index:%d formatId:%d is not supported by client\n",
|
||||
weston_log("RDP %s (%p:%s) specified format \"%s\" index:%d is not supported by client\n",
|
||||
__func__, source, clipboard_data_source_state_to_string(source),
|
||||
mime_type, index, source->client_format_id_table[index]);
|
||||
mime_type, index);
|
||||
goto error_return_close_fd;
|
||||
}
|
||||
|
||||
|
@ -2162,10 +2162,6 @@ input_handle_touch_up(void *data, struct wl_touch *wl_touch,
|
||||
timespec_from_msec(&ts, time);
|
||||
|
||||
input->touch_points--;
|
||||
if (input->touch_points == 0) {
|
||||
input->touch_focus = NULL;
|
||||
input->touch_active = false;
|
||||
}
|
||||
|
||||
if (!output)
|
||||
return;
|
||||
@ -2228,6 +2224,11 @@ input_handle_touch_frame(void *data, struct wl_touch *wl_touch)
|
||||
return;
|
||||
|
||||
notify_touch_frame(input->touch_device);
|
||||
|
||||
if (input->touch_points == 0) {
|
||||
input->touch_focus = NULL;
|
||||
input->touch_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -396,6 +396,7 @@ weston_view_create(struct weston_surface *surface)
|
||||
wl_list_insert(&surface->views, &view->surface_link);
|
||||
|
||||
wl_signal_init(&view->destroy_signal);
|
||||
wl_signal_init(&view->unmap_signal);
|
||||
wl_list_init(&view->link);
|
||||
wl_list_init(&view->layer_link.link);
|
||||
wl_list_init(&view->paint_node_list);
|
||||
@ -1827,6 +1828,7 @@ transform_parent_handle_parent_destroy(struct wl_listener *listener,
|
||||
geometry.parent_destroy_listener);
|
||||
|
||||
weston_view_set_transform_parent(view, NULL);
|
||||
view->parent_view = NULL;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
@ -2247,22 +2249,22 @@ weston_view_unmap(struct weston_view *view)
|
||||
view->output_mask = 0;
|
||||
weston_surface_assign_output(view->surface);
|
||||
|
||||
if (weston_surface_is_mapped(view->surface))
|
||||
return;
|
||||
if (!weston_surface_is_mapped(view->surface)) {
|
||||
wl_list_for_each(seat, &view->surface->compositor->seat_list, link) {
|
||||
struct weston_touch *touch = weston_seat_get_touch(seat);
|
||||
struct weston_pointer *pointer = weston_seat_get_pointer(seat);
|
||||
struct weston_keyboard *keyboard =
|
||||
weston_seat_get_keyboard(seat);
|
||||
|
||||
wl_list_for_each(seat, &view->surface->compositor->seat_list, link) {
|
||||
struct weston_touch *touch = weston_seat_get_touch(seat);
|
||||
struct weston_pointer *pointer = weston_seat_get_pointer(seat);
|
||||
struct weston_keyboard *keyboard =
|
||||
weston_seat_get_keyboard(seat);
|
||||
|
||||
if (keyboard && keyboard->focus == view->surface)
|
||||
weston_keyboard_set_focus(keyboard, NULL);
|
||||
if (pointer && pointer->focus == view)
|
||||
weston_pointer_clear_focus(pointer);
|
||||
if (touch && touch->focus == view)
|
||||
weston_touch_set_focus(touch, NULL);
|
||||
if (keyboard && keyboard->focus == view->surface)
|
||||
weston_keyboard_set_focus(keyboard, NULL);
|
||||
if (pointer && pointer->focus == view)
|
||||
weston_pointer_clear_focus(pointer);
|
||||
if (touch && touch->focus == view)
|
||||
weston_touch_set_focus(touch, NULL);
|
||||
}
|
||||
}
|
||||
weston_signal_emit_mutable(&view->unmap_signal, view);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
|
@ -75,6 +75,15 @@ struct border {
|
||||
enum motion_direction blocking_dir;
|
||||
};
|
||||
|
||||
struct pending_touch {
|
||||
struct weston_touch_device *touch_device;
|
||||
bool pending_focus_touch_reset;
|
||||
|
||||
struct wl_list touch_link;
|
||||
};
|
||||
|
||||
static struct wl_list pending_touch_list;
|
||||
|
||||
static void
|
||||
maybe_warp_confined_pointer(struct weston_pointer_constraint *constraint);
|
||||
|
||||
@ -143,6 +152,7 @@ weston_touch_create_touch_device(struct weston_touch *touch,
|
||||
const struct weston_touch_device_ops *ops)
|
||||
{
|
||||
struct weston_touch_device *device;
|
||||
struct pending_touch *pt;
|
||||
|
||||
assert(syspath);
|
||||
if (ops) {
|
||||
@ -164,20 +174,55 @@ weston_touch_create_touch_device(struct weston_touch *touch,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pt = zalloc(sizeof(*pt));
|
||||
if (!pt) {
|
||||
free(device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
device->backend_data = backend_data;
|
||||
device->ops = ops;
|
||||
|
||||
pt->touch_device = device;
|
||||
pt->pending_focus_touch_reset = false;
|
||||
|
||||
device->aggregate = touch;
|
||||
wl_list_insert(touch->device_list.prev, &device->link);
|
||||
wl_list_insert(&pending_touch_list, &pt->touch_link);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static struct pending_touch *
|
||||
weston_touch_get_pending(struct weston_touch_device *dev)
|
||||
{
|
||||
struct pending_touch *pt_iter = NULL;
|
||||
struct pending_touch *pt = NULL;
|
||||
|
||||
wl_list_for_each(pt_iter, &pending_touch_list, touch_link) {
|
||||
if (pt_iter->touch_device == dev) {
|
||||
pt = pt_iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return pt;
|
||||
}
|
||||
|
||||
/** Destroy the touch device. */
|
||||
WL_EXPORT void
|
||||
weston_touch_device_destroy(struct weston_touch_device *device)
|
||||
{
|
||||
struct pending_touch *pt = NULL;
|
||||
|
||||
wl_list_remove(&device->link);
|
||||
pt = weston_touch_get_pending(device);
|
||||
|
||||
assert(pt);
|
||||
wl_list_remove(&pt->touch_link);
|
||||
free(pt);
|
||||
|
||||
wl_signal_emit(&device->destroy_signal, device);
|
||||
free(device->syspath);
|
||||
free(device);
|
||||
@ -2388,6 +2433,7 @@ process_touch_normal(struct weston_touch_device *device,
|
||||
struct weston_touch_grab *grab = device->aggregate->grab;
|
||||
struct weston_compositor *ec = device->aggregate->seat->compositor;
|
||||
struct weston_view *ev;
|
||||
struct pending_touch *pt = NULL;
|
||||
wl_fixed_t sx, sy;
|
||||
wl_fixed_t x = wl_fixed_from_double(double_x);
|
||||
wl_fixed_t y = wl_fixed_from_double(double_y);
|
||||
@ -2438,8 +2484,9 @@ process_touch_normal(struct weston_touch_device *device,
|
||||
break;
|
||||
case WL_TOUCH_UP:
|
||||
grab->interface->up(grab, time, touch_id);
|
||||
if (touch->num_tp == 0)
|
||||
weston_touch_set_focus(touch, NULL);
|
||||
pt = weston_touch_get_pending(device);
|
||||
assert(pt);
|
||||
pt->pending_focus_touch_reset = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2628,12 +2675,22 @@ WL_EXPORT void
|
||||
notify_touch_frame(struct weston_touch_device *device)
|
||||
{
|
||||
struct weston_touch_grab *grab;
|
||||
struct pending_touch *pt;
|
||||
|
||||
switch (weston_touch_device_get_mode(device)) {
|
||||
case WESTON_TOUCH_MODE_NORMAL:
|
||||
case WESTON_TOUCH_MODE_PREP_CALIB:
|
||||
grab = device->aggregate->grab;
|
||||
grab->interface->frame(grab);
|
||||
|
||||
pt = weston_touch_get_pending(device);
|
||||
assert(pt);
|
||||
|
||||
if (pt->pending_focus_touch_reset) {
|
||||
if (grab->touch->num_tp == 0)
|
||||
weston_touch_set_focus(grab->touch, NULL);
|
||||
pt->pending_focus_touch_reset = false;
|
||||
}
|
||||
break;
|
||||
case WESTON_TOUCH_MODE_CALIB:
|
||||
case WESTON_TOUCH_MODE_PREP_NORMAL:
|
||||
@ -3656,8 +3713,8 @@ enable_pointer_constraint(struct weston_pointer_constraint *constraint,
|
||||
constraint->view = view;
|
||||
pointer_constraint_notify_activated(constraint);
|
||||
weston_pointer_start_grab(constraint->pointer, &constraint->grab);
|
||||
wl_list_remove(&constraint->surface_destroy_listener.link);
|
||||
wl_list_init(&constraint->surface_destroy_listener.link);
|
||||
wl_signal_add(&constraint->view->unmap_signal,
|
||||
&constraint->view_unmap_listener);
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -3672,6 +3729,8 @@ weston_pointer_constraint_disable(struct weston_pointer_constraint *constraint)
|
||||
constraint->view = NULL;
|
||||
pointer_constraint_notify_deactivated(constraint);
|
||||
weston_pointer_end_grab(constraint->grab.pointer);
|
||||
wl_list_remove(&constraint->view_unmap_listener.link);
|
||||
wl_list_init(&constraint->view_unmap_listener.link);
|
||||
}
|
||||
|
||||
void
|
||||
@ -3681,7 +3740,6 @@ weston_pointer_constraint_destroy(struct weston_pointer_constraint *constraint)
|
||||
weston_pointer_constraint_disable(constraint);
|
||||
|
||||
wl_list_remove(&constraint->pointer_destroy_listener.link);
|
||||
wl_list_remove(&constraint->surface_destroy_listener.link);
|
||||
wl_list_remove(&constraint->surface_commit_listener.link);
|
||||
wl_list_remove(&constraint->surface_activate_listener.link);
|
||||
|
||||
@ -3878,13 +3936,13 @@ pointer_constraint_pointer_destroyed(struct wl_listener *listener, void *data)
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_constraint_surface_destroyed(struct wl_listener *listener, void *data)
|
||||
pointer_constraint_view_unmapped(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct weston_pointer_constraint *constraint =
|
||||
container_of(listener, struct weston_pointer_constraint,
|
||||
surface_destroy_listener);
|
||||
struct weston_pointer_constraint *constraint =
|
||||
container_of(listener, struct weston_pointer_constraint,
|
||||
view_unmap_listener);
|
||||
|
||||
weston_pointer_constraint_destroy(constraint);
|
||||
disable_pointer_constraint(constraint);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3948,8 +4006,8 @@ weston_pointer_constraint_create(struct weston_surface *surface,
|
||||
|
||||
constraint->surface_activate_listener.notify =
|
||||
pointer_constraint_surface_activate;
|
||||
constraint->surface_destroy_listener.notify =
|
||||
pointer_constraint_surface_destroyed;
|
||||
constraint->view_unmap_listener.notify =
|
||||
pointer_constraint_view_unmapped;
|
||||
constraint->surface_commit_listener.notify =
|
||||
pointer_constraint_surface_committed;
|
||||
constraint->pointer_destroy_listener.notify =
|
||||
@ -3959,8 +4017,6 @@ weston_pointer_constraint_create(struct weston_surface *surface,
|
||||
&constraint->surface_activate_listener);
|
||||
wl_signal_add(&pointer->destroy_signal,
|
||||
&constraint->pointer_destroy_listener);
|
||||
wl_signal_add(&surface->destroy_signal,
|
||||
&constraint->surface_destroy_listener);
|
||||
wl_signal_add(&surface->commit_signal,
|
||||
&constraint->surface_commit_listener);
|
||||
|
||||
@ -4730,6 +4786,7 @@ maybe_warp_confined_pointer(struct weston_pointer_constraint *constraint)
|
||||
pixman_region32_intersect(&confine_region,
|
||||
&constraint->view->surface->input,
|
||||
&constraint->region);
|
||||
assert(pixman_region32_not_empty(&confine_region));
|
||||
region_to_outline(&confine_region, &borders);
|
||||
pixman_region32_fini(&confine_region);
|
||||
|
||||
@ -5059,6 +5116,8 @@ bind_input_timestamps_manager(struct wl_client *client, void *data,
|
||||
int
|
||||
weston_input_init(struct weston_compositor *compositor)
|
||||
{
|
||||
wl_list_init(&pending_touch_list);
|
||||
|
||||
if (!wl_global_create(compositor->wl_display,
|
||||
&zwp_relative_pointer_manager_v1_interface, 1,
|
||||
compositor, bind_relative_pointer_manager))
|
||||
|
@ -45,7 +45,8 @@
|
||||
#include "wcap/wcap-decode.h"
|
||||
|
||||
struct screenshooter_frame_listener {
|
||||
struct wl_listener listener;
|
||||
struct wl_listener frame_listener;
|
||||
struct wl_listener buffer_destroy_listener;
|
||||
struct weston_buffer *buffer;
|
||||
struct weston_output *output;
|
||||
weston_screenshooter_done_func_t done;
|
||||
@ -120,7 +121,8 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct screenshooter_frame_listener *l =
|
||||
container_of(listener,
|
||||
struct screenshooter_frame_listener, listener);
|
||||
struct screenshooter_frame_listener,
|
||||
frame_listener);
|
||||
struct weston_output *output = l->output;
|
||||
struct weston_compositor *compositor = output->compositor;
|
||||
const pixman_format_code_t pixman_format =
|
||||
@ -130,6 +132,8 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data)
|
||||
|
||||
weston_output_disable_planes_decr(output);
|
||||
wl_list_remove(&listener->link);
|
||||
wl_list_remove(&l->buffer_destroy_listener.link);
|
||||
|
||||
stride = l->buffer->width * (PIXMAN_FORMAT_BPP(pixman_format) / 8);
|
||||
pixels = malloc(stride * l->buffer->height);
|
||||
|
||||
@ -177,6 +181,22 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data)
|
||||
free(l);
|
||||
}
|
||||
|
||||
static void
|
||||
buffer_destroy_handle(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct screenshooter_frame_listener *l =
|
||||
container_of(listener,
|
||||
struct screenshooter_frame_listener,
|
||||
buffer_destroy_listener);
|
||||
|
||||
weston_output_disable_planes_decr(l->output);
|
||||
wl_list_remove(&listener->link);
|
||||
wl_list_remove(&l->frame_listener.link);
|
||||
l->done(l->data, WESTON_SCREENSHOOTER_BAD_BUFFER);
|
||||
|
||||
free(l);
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
weston_screenshooter_shoot(struct weston_output *output,
|
||||
struct weston_buffer *buffer,
|
||||
@ -205,8 +225,13 @@ weston_screenshooter_shoot(struct weston_output *output,
|
||||
l->output = output;
|
||||
l->done = done;
|
||||
l->data = data;
|
||||
l->listener.notify = screenshooter_frame_notify;
|
||||
wl_signal_add(&output->frame_signal, &l->listener);
|
||||
|
||||
l->frame_listener.notify = screenshooter_frame_notify;
|
||||
wl_signal_add(&output->frame_signal, &l->frame_listener);
|
||||
|
||||
l->buffer_destroy_listener.notify = buffer_destroy_handle;
|
||||
wl_signal_add(&buffer->destroy_signal, &l->buffer_destroy_listener);
|
||||
|
||||
weston_output_disable_planes_incr(output);
|
||||
weston_output_schedule_repaint(output);
|
||||
|
||||
|
@ -172,7 +172,7 @@ silenty clamped to the hardware driver supported range. This artificially
|
||||
limits the driver chosen link bits-per-channel which may be useful for working
|
||||
around sink hardware (e.g. monitor) limitations. The default is 16 which is
|
||||
practically unlimited. If you need to work around hardware issues, try a lower
|
||||
value like 8.
|
||||
value like 8. A value of 0 means that the current max bpc will be reprogrammed.
|
||||
|
||||
.SS Section remote-output
|
||||
.TP
|
||||
|
@ -1,6 +1,6 @@
|
||||
project('weston',
|
||||
'c',
|
||||
version: '11.0.0',
|
||||
version: '11.0.3',
|
||||
default_options: [
|
||||
'warning_level=3',
|
||||
'c_std=gnu99',
|
||||
|
@ -149,6 +149,16 @@ lookup_pipewire_output(struct weston_output *base_output)
|
||||
struct weston_pipewire *pipewire = weston_pipewire_get(c);
|
||||
struct pipewire_output *output;
|
||||
|
||||
/* XXX: This could happen on the compositor shutdown path with our
|
||||
* destroy listener being removed, and pipewire_output_destroy() being
|
||||
* called as a virtual destructor.
|
||||
*
|
||||
* See https://gitlab.freedesktop.org/wayland/weston/-/issues/591 for
|
||||
* an alternative to the shutdown sequence.
|
||||
*/
|
||||
if (!pipewire)
|
||||
return NULL;
|
||||
|
||||
wl_list_for_each(output, &pipewire->output_list, link) {
|
||||
if (output->output == base_output)
|
||||
return output;
|
||||
@ -310,6 +320,11 @@ pipewire_output_destroy(struct weston_output *base_output)
|
||||
struct pipewire_output *output = lookup_pipewire_output(base_output);
|
||||
struct weston_mode *mode, *next;
|
||||
|
||||
if (!output)
|
||||
return;
|
||||
|
||||
weston_head_release(output->head);
|
||||
|
||||
wl_list_for_each_safe(mode, next, &base_output->mode_list, link) {
|
||||
wl_list_remove(&mode->link);
|
||||
free(mode);
|
||||
@ -318,7 +333,6 @@ pipewire_output_destroy(struct weston_output *base_output)
|
||||
pw_stream_destroy(output->stream);
|
||||
|
||||
wl_list_remove(&output->link);
|
||||
weston_head_release(output->head);
|
||||
free(output->head);
|
||||
free(output);
|
||||
}
|
||||
@ -630,13 +644,19 @@ weston_pipewire_destroy(struct wl_listener *l, void *data)
|
||||
{
|
||||
struct weston_pipewire *pipewire =
|
||||
wl_container_of(l, pipewire, destroy_listener);
|
||||
struct pipewire_output *p_output, *p_output_next;
|
||||
|
||||
weston_log_scope_destroy(pipewire->debug);
|
||||
pipewire->debug = NULL;
|
||||
|
||||
wl_list_for_each_safe(p_output, p_output_next, &pipewire->output_list, link)
|
||||
pipewire_output_destroy(p_output->output);
|
||||
|
||||
wl_event_source_remove(pipewire->loop_source);
|
||||
pw_loop_leave(pipewire->loop);
|
||||
pw_loop_destroy(pipewire->loop);
|
||||
|
||||
free(pipewire);
|
||||
}
|
||||
|
||||
static struct weston_pipewire *
|
||||
|
@ -512,6 +512,16 @@ lookup_remoted_output(struct weston_output *output)
|
||||
struct weston_remoting *remoting = weston_remoting_get(c);
|
||||
struct remoted_output *remoted_output;
|
||||
|
||||
/* XXX: This could happen on the compositor shutdown path with our
|
||||
* destroy listener being removed, and remoting_output_destroy() being
|
||||
* called as a virtual destructor.
|
||||
*
|
||||
* See https://gitlab.freedesktop.org/wayland/weston/-/issues/591 for
|
||||
* an alternative to the shutdown sequence.
|
||||
*/
|
||||
if (!remoting)
|
||||
return NULL;
|
||||
|
||||
wl_list_for_each(remoted_output, &remoting->output_list, link) {
|
||||
if (remoted_output->output == output)
|
||||
return remoted_output;
|
||||
@ -636,6 +646,11 @@ remoting_output_destroy(struct weston_output *output)
|
||||
struct remoted_output *remoted_output = lookup_remoted_output(output);
|
||||
struct weston_mode *mode, *next;
|
||||
|
||||
if (!remoted_output)
|
||||
return;
|
||||
|
||||
weston_head_release(remoted_output->head);
|
||||
|
||||
wl_list_for_each_safe(mode, next, &output->mode_list, link) {
|
||||
wl_list_remove(&mode->link);
|
||||
free(mode);
|
||||
@ -650,7 +665,6 @@ remoting_output_destroy(struct weston_output *output)
|
||||
free(remoted_output->gst_pipeline);
|
||||
|
||||
wl_list_remove(&remoted_output->link);
|
||||
weston_head_release(remoted_output->head);
|
||||
free(remoted_output->head);
|
||||
free(remoted_output);
|
||||
}
|
||||
|
@ -40,13 +40,14 @@ static inline void *
|
||||
abort_oom_if_null(void *p)
|
||||
{
|
||||
static const char oommsg[] = ": out of memory\n";
|
||||
size_t written __attribute__((unused));
|
||||
|
||||
if (p)
|
||||
return p;
|
||||
|
||||
write(STDERR_FILENO, program_invocation_short_name,
|
||||
strlen(program_invocation_short_name));
|
||||
write(STDERR_FILENO, oommsg, strlen(oommsg));
|
||||
written = write(STDERR_FILENO, program_invocation_short_name,
|
||||
strlen(program_invocation_short_name));
|
||||
written = write(STDERR_FILENO, oommsg, strlen(oommsg));
|
||||
|
||||
abort();
|
||||
}
|
||||
|
@ -199,6 +199,9 @@ weston_wm_get_selection_targets(struct weston_wm *wm)
|
||||
char *logstr;
|
||||
size_t logsize;
|
||||
|
||||
if (!seat)
|
||||
return;
|
||||
|
||||
cookie = xcb_get_property(wm->conn,
|
||||
1, /* delete */
|
||||
wm->selection_window,
|
||||
@ -631,6 +634,9 @@ weston_wm_handle_xfixes_selection_notify(struct weston_wm *wm,
|
||||
xfixes_selection_notify->owner);
|
||||
|
||||
if (xfixes_selection_notify->owner == XCB_WINDOW_NONE) {
|
||||
if (!seat)
|
||||
return 1;
|
||||
|
||||
if (wm->selection_owner != wm->selection_window) {
|
||||
/* A real X client selection went away, not our
|
||||
* proxy selection. Clear the wayland selection. */
|
||||
@ -714,6 +720,8 @@ weston_wm_set_selection(struct wl_listener *listener, void *data)
|
||||
wm->selection_window,
|
||||
wm->atom.clipboard,
|
||||
XCB_TIME_CURRENT_TIME);
|
||||
|
||||
xcb_flush(wm->conn);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2795,6 +2795,8 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
|
||||
struct theme *t;
|
||||
int new_width, new_height;
|
||||
int vborder, hborder;
|
||||
bool use_saved_dimensions = false;
|
||||
bool use_current_dimensions = false;
|
||||
|
||||
if (!window || !window->wm)
|
||||
return;
|
||||
@ -2809,20 +2811,46 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
|
||||
vborder = 0;
|
||||
}
|
||||
|
||||
if (width > hborder)
|
||||
new_width = width - hborder;
|
||||
else
|
||||
new_width = 1;
|
||||
/* A config event with width == 0 or height == 0 is a hint to the client
|
||||
* to choose its own dimensions. Since X11 clients don't support such
|
||||
* hints we make a best guess here by trying to use the last saved
|
||||
* dimensions or, as a fallback, the current dimensions. */
|
||||
if (width == 0 || height == 0) {
|
||||
use_saved_dimensions = window->saved_width > 0 &&
|
||||
window->saved_height > 0;
|
||||
use_current_dimensions = !use_saved_dimensions &&
|
||||
window->width > 0 &&
|
||||
window->height > 0;
|
||||
}
|
||||
|
||||
if (height > vborder)
|
||||
new_height = height - vborder;
|
||||
else
|
||||
new_height = 1;
|
||||
/* The saved or current dimensions are the plain window content
|
||||
* dimensions without the borders, so we can use them directly for
|
||||
* new_width and new_height below. */
|
||||
if (use_current_dimensions) {
|
||||
new_width = window->width;
|
||||
new_height = window->height;
|
||||
} else if (use_saved_dimensions) {
|
||||
new_width = window->saved_width;
|
||||
new_height = window->saved_height;
|
||||
} else {
|
||||
new_width = (width > hborder) ? (width - hborder) : 1;
|
||||
new_height = (height > vborder) ? (height - vborder) : 1;
|
||||
}
|
||||
|
||||
if (window->width != new_width || window->height != new_height) {
|
||||
window->width = new_width;
|
||||
window->height = new_height;
|
||||
|
||||
/* Save the toplevel size so that we can pick up a reasonable
|
||||
* value when the compositor tell us to choose a size. We are
|
||||
* already saving the size before going fullscreen/maximized,
|
||||
* but this covers the case in which our size is changed but we
|
||||
* continue on a normal state. */
|
||||
if (!weston_wm_window_is_maximized(window) && !window->fullscreen) {
|
||||
window->saved_width = new_width;
|
||||
window->saved_height = new_height;
|
||||
}
|
||||
|
||||
if (window->frame) {
|
||||
if (weston_wm_window_is_maximized(window))
|
||||
frame_set_flag(window->frame, FRAME_FLAG_MAXIMIZED);
|
||||
@ -2937,6 +2965,9 @@ weston_wm_window_is_positioned(struct weston_wm_window *window)
|
||||
weston_log("XWM warning: win %d did not see map request\n",
|
||||
window->id);
|
||||
|
||||
if (window->size_hints.flags & (USPosition | PPosition))
|
||||
return true;
|
||||
|
||||
return window->map_request_x != 0 || window->map_request_y != 0;
|
||||
}
|
||||
|
||||
@ -3017,7 +3048,9 @@ xserver_map_shell_surface(struct weston_wm_window *window,
|
||||
} else if (window->override_redirect) {
|
||||
xwayland_interface->set_xwayland(window->shsurf,
|
||||
window->x, window->y);
|
||||
} else if (window->transient_for && window->transient_for->surface) {
|
||||
} else if (window->transient_for &&
|
||||
!window->transient_for->override_redirect &&
|
||||
window->transient_for->surface) {
|
||||
parent = window->transient_for;
|
||||
if (weston_wm_window_type_inactive(window)) {
|
||||
xwayland_interface->set_transient(window->shsurf,
|
||||
|
Loading…
x
Reference in New Issue
Block a user