mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 14:08:04 +02:00
Compare commits
39 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3038814ed | ||
|
|
8f12365f13 | ||
|
|
4c2bbc5180 | ||
|
|
e4323dc7c9 | ||
|
|
641ac3ef82 | ||
|
|
65c7cc45b3 | ||
|
|
60963b795c | ||
|
|
d1f9bd3d09 | ||
|
|
5ea838be63 | ||
|
|
1a9149cc06 | ||
|
|
0b5c47edca | ||
|
|
6445af1ead | ||
|
|
8f1a089917 | ||
|
|
015b3b4d4c | ||
|
|
51dfd1be3a | ||
|
|
ef25333fac | ||
|
|
cb8bb2763a | ||
|
|
3b340a2f9e | ||
|
|
f87d119e56 | ||
|
|
1cb63e1f83 | ||
|
|
23f254c690 | ||
|
|
11f20fa8e4 | ||
|
|
9eb44254a7 | ||
|
|
8eb0ff8a19 | ||
|
|
af871d82ef | ||
|
|
ee92a531da | ||
|
|
353600b6fc | ||
|
|
a712e803d2 | ||
|
|
d70f91d3f1 | ||
|
|
26e03f3891 | ||
|
|
61f2248de2 | ||
|
|
7eaba52a22 | ||
|
|
502e4bd31d | ||
|
|
e056153bf4 | ||
|
|
6d015b4759 | ||
|
|
ca3c5b8015 | ||
|
|
1e667cf0c3 | ||
|
|
efd6789934 | ||
|
|
32f5596178 |
25 changed files with 315 additions and 140 deletions
|
|
@ -3889,7 +3889,7 @@ input_set_pointer_image_index(struct input *input, int index)
|
|||
struct wl_cursor_image *image;
|
||||
int dx = 0, dy = 0;
|
||||
|
||||
if (!input->pointer)
|
||||
if (!input->pointer || !input->pointer_surface)
|
||||
return;
|
||||
|
||||
cursor = input->display->cursors[input->current_cursor];
|
||||
|
|
|
|||
|
|
@ -2895,13 +2895,14 @@ panel_committed(struct weston_surface *es,
|
|||
weston_surface_map(es);
|
||||
assert(wl_list_empty(&es->views));
|
||||
sh_output->panel_view = weston_view_create(es);
|
||||
|
||||
weston_view_move_to_layer(sh_output->panel_view,
|
||||
&shell->panel_layer.view_list);
|
||||
}
|
||||
|
||||
assert(sh_output->panel_view);
|
||||
pos = weston_coord_global_add(output->pos, sh_output->panel_offset);
|
||||
weston_view_set_position(sh_output->panel_view, pos);
|
||||
weston_view_move_to_layer(sh_output->panel_view,
|
||||
&shell->panel_layer.view_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -2580,23 +2580,21 @@ wet_output_overlap_post_enable(struct weston_head *head,
|
|||
static void
|
||||
simple_heads_output_sharing_resize(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct weston_head *head = data;
|
||||
struct weston_head *head_to_mirror = NULL;
|
||||
struct weston_output *output;
|
||||
struct weston_output *output = data;
|
||||
struct wet_head_tracker *head_track =
|
||||
container_of(listener, struct wet_head_tracker, resized_listener);
|
||||
struct wet_compositor *wet = head_track->wet;
|
||||
struct weston_mode mode;
|
||||
int scale = 1;
|
||||
|
||||
output = weston_head_get_output(head);
|
||||
head_to_mirror = wet_config_find_head_to_mirror(output, wet);
|
||||
if (!head_to_mirror)
|
||||
return;
|
||||
|
||||
weston_output_set_position(head_to_mirror->output, output->pos);
|
||||
|
||||
wet_output_compute_output_from_mirror(head->output,
|
||||
wet_output_compute_output_from_mirror(output,
|
||||
head_to_mirror->output,
|
||||
&mode, &scale);
|
||||
weston_output_mode_set_native(head_to_mirror->output, &mode, scale);
|
||||
|
|
|
|||
|
|
@ -2217,8 +2217,6 @@ void
|
|||
weston_output_schedule_repaint_reset(struct weston_output *output);
|
||||
void
|
||||
weston_output_schedule_repaint_restart(struct weston_output *output);
|
||||
enum weston_compositor_backend
|
||||
weston_get_backend_type(struct weston_backend *backend);
|
||||
void
|
||||
weston_compositor_schedule_repaint(struct weston_compositor *compositor);
|
||||
void
|
||||
|
|
@ -2475,6 +2473,8 @@ struct weston_backend *
|
|||
weston_compositor_load_backend(struct weston_compositor *compositor,
|
||||
enum weston_compositor_backend backend,
|
||||
struct weston_backend_config *config_base);
|
||||
enum weston_compositor_backend
|
||||
weston_get_backend_type(struct weston_backend *backend);
|
||||
void
|
||||
weston_compositor_exit(struct weston_compositor *ec);
|
||||
void *
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ weston_coord_surface_sub(struct weston_coord_surface a,
|
|||
static inline struct weston_coord __attribute__ ((warn_unused_result))
|
||||
weston_coord_truncate(struct weston_coord in)
|
||||
{
|
||||
return (struct weston_coord){ (int)in.x, (int)in.y };
|
||||
return (struct weston_coord){ (double)(int) in.x, (double)(int) in.y };
|
||||
}
|
||||
|
||||
static inline struct weston_coord_surface __attribute__ ((warn_unused_result))
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ extern "C" {
|
|||
|
||||
#include <libweston/plugin-registry.h>
|
||||
|
||||
#ifndef ARRAY_LENGTH
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
#endif
|
||||
|
||||
struct weston_compositor;
|
||||
struct weston_output;
|
||||
|
||||
|
|
|
|||
|
|
@ -163,11 +163,12 @@ enum try_view_on_plane_failure_reasons {
|
|||
FAILURE_REASONS_INADEQUATE_CONTENT_PROTECTION = 1 << 6,
|
||||
FAILURE_REASONS_INCOMPATIBLE_TRANSFORM = 1 << 7,
|
||||
FAILURE_REASONS_NO_BUFFER = 1 << 8,
|
||||
FAILURE_REASONS_BUFFER_TYPE = 1 << 9,
|
||||
FAILURE_REASONS_GLOBAL_ALPHA = 1 << 10,
|
||||
FAILURE_REASONS_NO_GBM = 1 << 11,
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED = 1 << 12,
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED = 1 << 13,
|
||||
FAILURE_REASONS_BUFFER_TOO_BIG = 1 << 9,
|
||||
FAILURE_REASONS_BUFFER_TYPE = 1 << 10,
|
||||
FAILURE_REASONS_GLOBAL_ALPHA = 1 << 11,
|
||||
FAILURE_REASONS_NO_GBM = 1 << 12,
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED = 1 << 13,
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED = 1 << 14,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -471,6 +472,7 @@ struct drm_writeback_state {
|
|||
|
||||
enum writeback_screenshot_state state;
|
||||
struct weston_capture_task *ct;
|
||||
struct wl_listener ct_destroy_listener;
|
||||
|
||||
struct drm_fb *fb;
|
||||
int32_t out_fence_fd;
|
||||
|
|
|
|||
|
|
@ -553,10 +553,14 @@ drm_writeback_state_alloc(void)
|
|||
}
|
||||
|
||||
static void
|
||||
drm_writeback_state_free(struct drm_writeback_state *state)
|
||||
drm_writeback_state_free(struct weston_compositor *c,
|
||||
struct drm_writeback_state *state)
|
||||
{
|
||||
struct drm_fb **fb;
|
||||
|
||||
/* Capture task must be retired before freeing the state. */
|
||||
assert(state->ct == NULL);
|
||||
|
||||
if (state->out_fence_fd >= 0)
|
||||
close(state->out_fence_fd);
|
||||
|
||||
|
|
@ -573,6 +577,21 @@ drm_writeback_state_free(struct drm_writeback_state *state)
|
|||
free(state);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_writeback_state_ct_destroy_handler(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct drm_writeback_state *state =
|
||||
container_of(listener, struct drm_writeback_state,
|
||||
ct_destroy_listener);
|
||||
|
||||
/**
|
||||
* Capture task was retired, so drop it from the state. The state is
|
||||
* destroyed once the wb job completes.
|
||||
*/
|
||||
state->ct = NULL;
|
||||
wl_list_remove(&state->ct_destroy_listener.link);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_output_pick_writeback_capture_task(struct drm_output *output)
|
||||
{
|
||||
|
|
@ -626,10 +645,13 @@ drm_output_pick_writeback_capture_task(struct drm_output *output)
|
|||
output->wb_state->state = DRM_OUTPUT_WB_SCREENSHOT_PREPARE_COMMIT;
|
||||
output->wb_state->ct = ct;
|
||||
|
||||
output->wb_state->ct_destroy_listener.notify = drm_writeback_state_ct_destroy_handler;
|
||||
weston_capture_task_add_destroy_listener(ct, &output->wb_state->ct_destroy_listener);
|
||||
|
||||
return;
|
||||
|
||||
err_fb:
|
||||
drm_writeback_state_free(output->wb_state);
|
||||
free(output->wb_state);
|
||||
output->wb_state = NULL;
|
||||
err:
|
||||
weston_capture_task_retire_failed(ct, msg);
|
||||
|
|
@ -2899,12 +2921,22 @@ static void
|
|||
drm_writeback_success_screenshot(struct drm_writeback_state *state)
|
||||
{
|
||||
struct drm_output *output = state->output;
|
||||
struct weston_buffer *buffer =
|
||||
weston_capture_task_get_buffer(state->ct);
|
||||
struct weston_compositor *c = output->base.compositor;
|
||||
struct weston_buffer *buffer;
|
||||
int width, height;
|
||||
int dst_stride, src_stride;
|
||||
uint32_t *src, *dst;
|
||||
|
||||
/**
|
||||
* Capture task already retired, see
|
||||
* drm_writeback_state_ct_destroy_handler(). Here we destroy the wb
|
||||
* state.
|
||||
*/
|
||||
if (!state->ct)
|
||||
goto destroy_state;
|
||||
|
||||
buffer = weston_capture_task_get_buffer(state->ct);
|
||||
|
||||
src = state->fb->map;
|
||||
src_stride = state->fb->strides[0];
|
||||
|
||||
|
|
@ -2921,7 +2953,10 @@ drm_writeback_success_screenshot(struct drm_writeback_state *state)
|
|||
wl_shm_buffer_end_access(buffer->shm_buffer);
|
||||
|
||||
weston_capture_task_retire_complete(state->ct);
|
||||
drm_writeback_state_free(state);
|
||||
state->ct = NULL;
|
||||
|
||||
destroy_state:
|
||||
drm_writeback_state_free(c, state);
|
||||
output->wb_state = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2930,9 +2965,21 @@ drm_writeback_fail_screenshot(struct drm_writeback_state *state,
|
|||
const char *err_msg)
|
||||
{
|
||||
struct drm_output *output = state->output;
|
||||
struct weston_compositor *c = output->base.compositor;
|
||||
|
||||
/**
|
||||
* Capture task already retired, see
|
||||
* drm_writeback_state_ct_destroy_handler(). Here we destroy the wb
|
||||
* state.
|
||||
*/
|
||||
if (!state->ct)
|
||||
goto destroy_state;
|
||||
|
||||
weston_capture_task_retire_failed(state->ct, err_msg);
|
||||
drm_writeback_state_free(state);
|
||||
state->ct = NULL;
|
||||
|
||||
destroy_state:
|
||||
drm_writeback_state_free(c, state);
|
||||
output->wb_state = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -742,7 +742,7 @@ drm_fb_get_from_paint_node(struct drm_output_state *state,
|
|||
fb = drm_fb_get_from_bo(bo, device, is_opaque, BUFFER_CLIENT);
|
||||
if (!fb) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
(1 << FAILURE_REASONS_ADD_FB_FAILED);
|
||||
FAILURE_REASONS_ADD_FB_FAILED;
|
||||
gbm_bo_destroy(bo);
|
||||
goto unsuitable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,42 +413,39 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
|
||||
bool view_matches_entire_output, scanout_has_view_assigned;
|
||||
uint32_t possible_plane_mask = 0;
|
||||
bool any_candidate_picked = false;
|
||||
|
||||
pnode->try_view_on_plane_failure_reasons = FAILURE_REASONS_NONE;
|
||||
|
||||
/* check view for valid buffer, doesn't make sense to even try */
|
||||
if (!weston_view_has_valid_buffer(ev)) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* filter out non-cursor views in renderer-only mode */
|
||||
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY &&
|
||||
ev->layer_link.layer != &b->compositor->cursor_layer)
|
||||
return NULL;
|
||||
|
||||
/* check view for valid buffer, doesn't make sense to even try */
|
||||
if (!weston_view_has_valid_buffer(ev)) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_NO_BUFFER;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer = ev->surface->buffer_ref.buffer;
|
||||
if (buffer->type == WESTON_BUFFER_SOLID) {
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
return NULL;
|
||||
FAILURE_REASONS_BUFFER_TYPE;
|
||||
} else if (buffer->type == WESTON_BUFFER_SHM) {
|
||||
if (!output->cursor_plane || device->cursors_are_broken) {
|
||||
if (!output->cursor_plane || device->cursors_are_broken)
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
return NULL;
|
||||
}
|
||||
FAILURE_REASONS_BUFFER_TYPE;
|
||||
|
||||
/* Even though this is a SHM buffer, pixel_format stores the
|
||||
* format code as DRM FourCC */
|
||||
/* Even though this is a SHM buffer, pixel_format stores
|
||||
* the format code as DRM FourCC */
|
||||
if (buffer->pixel_format->format != DRM_FORMAT_ARGB8888) {
|
||||
drm_debug(b, "\t\t\t\t[view] not placing view %p on "
|
||||
"plane; SHM buffers must be ARGB8888 for "
|
||||
"plane; SHM buffers must be ARGB8888 for "
|
||||
"cursor view\n", ev);
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (buffer->width > device->cursor_width ||
|
||||
|
|
@ -457,11 +454,11 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
"(buffer (%dx%d) too large for cursor plane)\n",
|
||||
ev, buffer->width, buffer->height);
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE;
|
||||
return NULL;
|
||||
FAILURE_REASONS_BUFFER_TOO_BIG;
|
||||
}
|
||||
|
||||
possible_plane_mask = (1 << output->cursor_plane->plane_idx);
|
||||
if (pnode->try_view_on_plane_failure_reasons == FAILURE_REASONS_NONE)
|
||||
possible_plane_mask = (1 << output->cursor_plane->plane_idx);
|
||||
} else {
|
||||
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY) {
|
||||
drm_debug(b, "\t\t\t\t[view] not assigning view %p "
|
||||
|
|
@ -477,20 +474,16 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
possible_plane_mask |= 1 << plane->plane_idx;
|
||||
}
|
||||
|
||||
if (!possible_plane_mask) {
|
||||
if (!possible_plane_mask)
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_INCOMPATIBLE_TRANSFORM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fb = drm_fb_get_from_paint_node(state, pnode);
|
||||
if (!fb) {
|
||||
if (fb)
|
||||
possible_plane_mask &= fb->plane_mask;
|
||||
else
|
||||
drm_debug(b, "\t\t\t[view] couldn't get FB for view: 0x%lx\n",
|
||||
(unsigned long) pnode->try_view_on_plane_failure_reasons);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
possible_plane_mask &= fb->plane_mask;
|
||||
(unsigned long) pnode->try_view_on_plane_failure_reasons);
|
||||
}
|
||||
|
||||
view_matches_entire_output =
|
||||
|
|
@ -521,7 +514,6 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
assert(plane == output->cursor_plane);
|
||||
break;
|
||||
case WDRM_PLANE_TYPE_PRIMARY:
|
||||
assert(fb);
|
||||
if (plane != output->scanout_plane)
|
||||
continue;
|
||||
if (mode != DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY)
|
||||
|
|
@ -530,7 +522,6 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
continue;
|
||||
break;
|
||||
case WDRM_PLANE_TYPE_OVERLAY:
|
||||
assert(fb);
|
||||
assert(mode != DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY);
|
||||
/* if the view covers the whole output, put it in the
|
||||
* scanout plane, not overlay */
|
||||
|
|
@ -595,7 +586,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) {
|
||||
drm_debug(b, "\t\t\t\t[%s] not placing view %p on %s: "
|
||||
"no in-fence support\n", p_name, ev, p_name);
|
||||
return NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!b->has_underlay && mm_has_underlay) {
|
||||
|
|
@ -613,6 +604,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
else
|
||||
zpos = MIN(current_lowest_zpos - 1, plane->zpos_max);
|
||||
|
||||
any_candidate_picked = true;
|
||||
drm_debug(b, "\t\t\t\t[plane] plane %d picked "
|
||||
"from candidate list, type: %s\n",
|
||||
plane->plane_id, p_name);
|
||||
|
|
@ -620,9 +612,10 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
if (plane->type == WDRM_PLANE_TYPE_CURSOR) {
|
||||
ps = drm_output_prepare_cursor_paint_node(state, pnode, zpos);
|
||||
} else {
|
||||
ps = drm_output_try_paint_node_on_plane(plane, state,
|
||||
pnode, mode,
|
||||
fb, zpos);
|
||||
if (fb)
|
||||
ps = drm_output_try_paint_node_on_plane(plane, state,
|
||||
pnode, mode,
|
||||
fb, zpos);
|
||||
}
|
||||
|
||||
if (ps) {
|
||||
|
|
@ -641,11 +634,9 @@ drm_output_find_plane_for_view(struct drm_output_state *state,
|
|||
FAILURE_REASONS_PLANES_REJECTED;
|
||||
}
|
||||
|
||||
if (!ps &&
|
||||
pnode->try_view_on_plane_failure_reasons == FAILURE_REASONS_NONE) {
|
||||
if (!any_candidate_picked)
|
||||
pnode->try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_NO_PLANES_AVAILABLE;
|
||||
}
|
||||
|
||||
/* if we have a plane state, it has its own ref to the fb; if not then
|
||||
* we drop ours here */
|
||||
|
|
@ -669,7 +660,6 @@ drm_output_propose_state(struct weston_output *output_base,
|
|||
pixman_region32_t occluded_region;
|
||||
|
||||
bool renderer_ok = (mode != DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY);
|
||||
bool need_underlay = false;
|
||||
int ret;
|
||||
/* Record the current lowest zpos of the overlay planes */
|
||||
uint64_t current_lowest_zpos_overlay = DRM_PLANE_ZPOS_INVALID_PLANE;
|
||||
|
|
@ -762,6 +752,7 @@ drm_output_propose_state(struct weston_output *output_base,
|
|||
pixman_region32_t clipped_view;
|
||||
pixman_region32_t surface_overlap;
|
||||
bool totally_occluded = false;
|
||||
bool need_underlay = false;
|
||||
|
||||
drm_debug(b, "\t\t\t[view] evaluating view %p for "
|
||||
"output %s (%lu)\n",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ if not get_option('backend-vnc')
|
|||
endif
|
||||
|
||||
config_h.set('BUILD_VNC_COMPOSITOR', '1')
|
||||
dep_neatvnc = dependency('neatvnc', version: ['>= 0.7.0', '< 0.9.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])
|
||||
dep_neatvnc = dependency('neatvnc', version: ['>= 0.7.0', '< 0.10.0'], required: false, fallback: ['neatvnc', 'neatvnc_dep'])
|
||||
if not dep_neatvnc.found()
|
||||
error('VNC backend requires neatvnc which was not found. Or, you can use \'-Dbackend-vnc=false\'.')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -217,6 +217,35 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
|
||||
pnode->draw_solid = false;
|
||||
pnode->is_direct = false;
|
||||
/* Check for content protection first, as we should always prevent
|
||||
* the rendering of protected content.
|
||||
*/
|
||||
if (surface->protection_mode ==
|
||||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED &&
|
||||
(recording_censor || unprotected_censor)) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
return;
|
||||
}
|
||||
/* Check if we need a hole before we check direct-display, otherwise
|
||||
* we'll end up drawing an opaque placeholder over direct_display
|
||||
* paint nodes when we place them on underlays.
|
||||
*/
|
||||
if (pnode->need_hole) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
|
||||
if (buffer->direct_display)
|
||||
pnode->is_direct = true;
|
||||
|
||||
pnode->solid = (struct weston_solid_buffer_values) {
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
};
|
||||
return;
|
||||
}
|
||||
if (buffer->direct_display) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = true;
|
||||
|
|
@ -225,25 +254,6 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
pnode->solid = placeholder_color;
|
||||
return;
|
||||
}
|
||||
if (pnode->need_hole) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = (struct weston_solid_buffer_values) {
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
};
|
||||
return;
|
||||
}
|
||||
if (surface->protection_mode !=
|
||||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED)
|
||||
return;
|
||||
|
||||
if (recording_censor || unprotected_censor) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
}
|
||||
}
|
||||
|
||||
/* Paint nodes contain filter and transform information that needs to be
|
||||
|
|
@ -4089,10 +4099,12 @@ weston_output_finish_frame(struct weston_output *output,
|
|||
TLP_VBLANK(&vblank_monotonic), TLP_END);
|
||||
|
||||
refresh_nsec = millihz_to_nsec(output->current_mode->refresh);
|
||||
weston_presentation_feedback_present_list(&output->feedback_list,
|
||||
output, refresh_nsec, stamp,
|
||||
output->msc,
|
||||
presented_flags);
|
||||
if (!(presented_flags & WP_PRESENTATION_FEEDBACK_INVALID)) {
|
||||
weston_presentation_feedback_present_list(&output->feedback_list,
|
||||
output, refresh_nsec, stamp,
|
||||
output->msc,
|
||||
presented_flags);
|
||||
}
|
||||
|
||||
output->frame_time = *stamp;
|
||||
|
||||
|
|
@ -6649,7 +6661,6 @@ weston_output_compute_protection(struct weston_output *output)
|
|||
|
||||
if (output->current_protection != op_protection) {
|
||||
output->current_protection = op_protection;
|
||||
weston_output_dirty_paint_nodes(output);
|
||||
weston_output_damage(output);
|
||||
weston_schedule_surface_protection_update(wc);
|
||||
}
|
||||
|
|
@ -7277,7 +7288,6 @@ weston_compositor_reflow_outputs(struct weston_compositor *compositor,
|
|||
struct weston_output *resized_output, int delta_width)
|
||||
{
|
||||
struct weston_output *output;
|
||||
bool start_resizing = false;
|
||||
|
||||
if (compositor->output_flow_dirty)
|
||||
return;
|
||||
|
|
@ -7286,17 +7296,21 @@ weston_compositor_reflow_outputs(struct weston_compositor *compositor,
|
|||
return;
|
||||
|
||||
wl_list_for_each(output, &compositor->output_list, link) {
|
||||
if (output == resized_output) {
|
||||
start_resizing = true;
|
||||
struct weston_coord_global pos = output->pos;
|
||||
|
||||
/* Since outputs are in a horizontal line, reflow any to the
|
||||
* right of the removed output.
|
||||
*
|
||||
* There's an easter egg here - with mirrored outputs, there
|
||||
* may still be an output at the same place as the removed
|
||||
* output, and we don't want to move its contents, so we use
|
||||
* <= here.
|
||||
*/
|
||||
if (pos.c.x <= resized_output->pos.c.x)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (start_resizing) {
|
||||
struct weston_coord_global pos = output->pos;
|
||||
|
||||
pos.c.x += delta_width;
|
||||
weston_output_set_position(output, pos);
|
||||
}
|
||||
pos.c.x += delta_width;
|
||||
weston_output_set_position(output, pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -456,8 +456,12 @@ weston_desktop_view_propagate_layer(struct weston_desktop_view *view)
|
|||
/* Move each child to the same layer, immediately in front of its
|
||||
* parent. */
|
||||
wl_list_for_each_reverse(child, &view->children_list, children_link) {
|
||||
struct weston_layer_entry *child_pos =
|
||||
wl_container_of(parent_pos->prev, child_pos, link);
|
||||
struct weston_layer_entry *child_pos;
|
||||
|
||||
if (view->view->layer_link.layer)
|
||||
child_pos = wl_container_of(parent_pos->prev, child_pos, link);
|
||||
else
|
||||
child_pos = NULL;
|
||||
|
||||
weston_view_move_to_layer(child->view, child_pos);
|
||||
weston_desktop_view_propagate_layer(child);
|
||||
|
|
|
|||
|
|
@ -781,8 +781,16 @@ weston_desktop_xdg_toplevel_resource_destroy(struct wl_resource *resource)
|
|||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
|
||||
if (dsurface != NULL)
|
||||
weston_desktop_surface_resource_destroy(resource);
|
||||
if (dsurface) {
|
||||
struct weston_desktop_xdg_toplevel *toplevel =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
|
||||
weston_surface_unmap(wsurface);
|
||||
wl_list_remove(wl_resource_get_link(resource));
|
||||
toplevel->resource = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct zxdg_toplevel_v6_interface weston_desktop_xdg_toplevel_implementation = {
|
||||
|
|
@ -1072,12 +1080,20 @@ weston_desktop_xdg_surface_protocol_get_toplevel(struct wl_client *wl_client,
|
|||
struct wl_resource *resource,
|
||||
uint32_t id)
|
||||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
struct weston_desktop_xdg_toplevel *toplevel =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop_surface *dsurface = NULL;
|
||||
struct weston_surface *wsurface = NULL;
|
||||
struct weston_desktop_xdg_toplevel *toplevel = NULL;
|
||||
|
||||
dsurface = wl_resource_get_user_data(resource);
|
||||
if (!dsurface) {
|
||||
wl_resource_post_error(resource,
|
||||
ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
|
||||
"xdg surface destroyed");
|
||||
return;
|
||||
}
|
||||
|
||||
wsurface = weston_desktop_surface_get_surface(dsurface);
|
||||
toplevel = weston_desktop_surface_get_implementation_data(dsurface);
|
||||
|
||||
if (weston_surface_set_role(wsurface, weston_desktop_xdg_toplevel_role,
|
||||
resource, ZXDG_SHELL_V6_ERROR_ROLE) < 0)
|
||||
|
|
@ -1101,12 +1117,9 @@ weston_desktop_xdg_surface_protocol_get_popup(struct wl_client *wl_client,
|
|||
struct wl_resource *parent_resource,
|
||||
struct wl_resource *positioner_resource)
|
||||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
struct weston_desktop_xdg_popup *popup =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop_surface *dsurface = NULL;
|
||||
struct weston_surface *wsurface = NULL;
|
||||
struct weston_desktop_xdg_popup *popup = NULL;
|
||||
struct weston_desktop_surface *parent_surface =
|
||||
wl_resource_get_user_data(parent_resource);
|
||||
struct weston_desktop_xdg_surface *parent =
|
||||
|
|
@ -1115,6 +1128,17 @@ weston_desktop_xdg_surface_protocol_get_popup(struct wl_client *wl_client,
|
|||
wl_resource_get_user_data(positioner_resource);
|
||||
struct weston_coord_surface offset;
|
||||
|
||||
dsurface = wl_resource_get_user_data(resource);
|
||||
if (!dsurface) {
|
||||
wl_resource_post_error(resource,
|
||||
ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
|
||||
"xdg surface destroyed");
|
||||
return;
|
||||
}
|
||||
|
||||
wsurface = weston_desktop_surface_get_surface(dsurface);
|
||||
popup = weston_desktop_surface_get_implementation_data(dsurface);
|
||||
|
||||
/* Checking whether the size and anchor rect both have a positive size
|
||||
* is enough to verify both have been correctly set */
|
||||
if (positioner->size.width == 0 || positioner->anchor_rect.width == 0) {
|
||||
|
|
@ -1200,6 +1224,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
|
|||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
if (dsurface == NULL) {
|
||||
wl_resource_post_error(resource,
|
||||
ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
|
||||
"xdg surface already destroyed configure "
|
||||
"serial: %u", serial);
|
||||
return;
|
||||
}
|
||||
|
||||
struct weston_desktop_xdg_surface *surface =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop_xdg_surface_configure *configure, *temp;
|
||||
|
|
|
|||
|
|
@ -887,8 +887,17 @@ weston_desktop_xdg_toplevel_resource_destroy(struct wl_resource *resource)
|
|||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
|
||||
if (dsurface != NULL)
|
||||
weston_desktop_surface_resource_destroy(resource);
|
||||
if (dsurface) {
|
||||
struct weston_desktop_xdg_toplevel *toplevel =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
|
||||
weston_surface_unmap(wsurface);
|
||||
wl_list_remove(wl_resource_get_link(resource));
|
||||
toplevel->resource = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static const struct xdg_toplevel_interface weston_desktop_xdg_toplevel_implementation = {
|
||||
|
|
@ -1246,13 +1255,22 @@ weston_desktop_xdg_surface_protocol_get_toplevel(struct wl_client *wl_client,
|
|||
struct wl_resource *resource,
|
||||
uint32_t id)
|
||||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
struct weston_desktop_xdg_toplevel *toplevel =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop *desktop = toplevel->base.desktop;
|
||||
struct weston_desktop_surface *dsurface = NULL;
|
||||
struct weston_surface *wsurface = NULL;
|
||||
struct weston_desktop_xdg_toplevel *toplevel = NULL;
|
||||
struct weston_desktop *desktop = NULL;
|
||||
|
||||
dsurface = wl_resource_get_user_data(resource);
|
||||
if (!dsurface) {
|
||||
wl_resource_post_error(resource,
|
||||
XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
|
||||
"xdg surface destroyed");
|
||||
return;
|
||||
}
|
||||
|
||||
wsurface = weston_desktop_surface_get_surface(dsurface);
|
||||
toplevel = weston_desktop_surface_get_implementation_data(dsurface);
|
||||
desktop = toplevel->base.desktop;
|
||||
|
||||
if (weston_surface_set_role(wsurface, weston_desktop_xdg_toplevel_role,
|
||||
resource, XDG_WM_BASE_ERROR_ROLE) < 0)
|
||||
|
|
@ -1305,18 +1323,26 @@ weston_desktop_xdg_surface_protocol_get_popup(struct wl_client *wl_client,
|
|||
struct wl_resource *parent_resource,
|
||||
struct wl_resource *positioner_resource)
|
||||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
struct weston_surface *wsurface =
|
||||
weston_desktop_surface_get_surface(dsurface);
|
||||
struct weston_desktop_xdg_popup *popup =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop_surface *dsurface = NULL;
|
||||
struct weston_surface *wsurface = NULL;
|
||||
struct weston_desktop_xdg_popup *popup = NULL;
|
||||
struct weston_desktop_surface *parent_surface;
|
||||
struct weston_desktop_xdg_surface *parent;
|
||||
struct weston_desktop_xdg_positioner *positioner =
|
||||
wl_resource_get_user_data(positioner_resource);
|
||||
struct weston_coord_surface offset;
|
||||
|
||||
dsurface = wl_resource_get_user_data(resource);
|
||||
if (!dsurface) {
|
||||
wl_resource_post_error(resource,
|
||||
XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
|
||||
"xdg surface destroyed");
|
||||
return;
|
||||
}
|
||||
|
||||
wsurface = weston_desktop_surface_get_surface(dsurface);
|
||||
popup = weston_desktop_surface_get_implementation_data(dsurface);
|
||||
|
||||
/* Popup parents are allowed to be non-null, but only if a parent is
|
||||
* specified 'using some other protocol' before committing. Since we
|
||||
* don't support such a protocol yet, clients cannot legitimately
|
||||
|
|
@ -1414,6 +1440,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
|
|||
{
|
||||
struct weston_desktop_surface *dsurface =
|
||||
wl_resource_get_user_data(resource);
|
||||
if (dsurface == NULL) {
|
||||
wl_resource_post_error(resource,
|
||||
XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
|
||||
"xdg surface already destroyed configure "
|
||||
"serial: %u", serial);
|
||||
return;
|
||||
}
|
||||
|
||||
struct weston_desktop_xdg_surface *surface =
|
||||
weston_desktop_surface_get_implementation_data(dsurface);
|
||||
struct weston_desktop_xdg_surface_configure *configure, *temp;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ update_lowest_free_bucket(struct weston_idalloc *idalloc)
|
|||
{
|
||||
uint32_t old_lowest_free_bucket = idalloc->lowest_free_bucket;
|
||||
uint32_t *bucket;
|
||||
uint32_t next_num;
|
||||
unsigned int i;
|
||||
|
||||
for (i = old_lowest_free_bucket; i < idalloc->num_buckets; i++) {
|
||||
|
|
@ -100,12 +101,18 @@ update_lowest_free_bucket(struct weston_idalloc *idalloc)
|
|||
return;
|
||||
}
|
||||
|
||||
/* We didn't find any free bucket, so we need to add more buckets. The
|
||||
* first one (from the new added) will be the lowest free. */
|
||||
/* We didn't find any free bucket, so we need to add more buckets. */
|
||||
next_num = idalloc->num_buckets * 2;
|
||||
weston_assert_uint32_gt(idalloc->compositor, next_num, idalloc->num_buckets);
|
||||
|
||||
idalloc->buckets = xrealloc(idalloc->buckets, next_num * sizeof(*idalloc->buckets));
|
||||
memset(&idalloc->buckets[idalloc->num_buckets], 0,
|
||||
(next_num - idalloc->num_buckets) * sizeof(*idalloc->buckets));
|
||||
|
||||
/* The first one (from the new added) is the lowest free. */
|
||||
idalloc->lowest_free_bucket = idalloc->num_buckets;
|
||||
idalloc->num_buckets *= 2;
|
||||
idalloc->buckets = xrealloc(idalloc->buckets,
|
||||
idalloc->num_buckets * sizeof(*idalloc->buckets));
|
||||
|
||||
idalloc->num_buckets = next_num;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -130,7 +137,7 @@ weston_idalloc_get_id(struct weston_idalloc *idalloc)
|
|||
continue;
|
||||
|
||||
/* Found free id, take it and set it to 1 on the bucket. */
|
||||
*bucket |= 1 << i;
|
||||
*bucket |= (uint32_t)1 << i;
|
||||
id = (32 * idalloc->lowest_free_bucket) + i;
|
||||
|
||||
/* Bucket may become full... */
|
||||
|
|
|
|||
|
|
@ -1922,6 +1922,7 @@ weston_pointer_set_focus(struct weston_pointer *pointer,
|
|||
if (view) {
|
||||
struct weston_coord_surface surf_pos;
|
||||
|
||||
weston_view_update_transform(view);
|
||||
surf_pos = weston_coord_global_to_surface(view, pointer->pos);
|
||||
sx = wl_fixed_from_double(surf_pos.c.x);
|
||||
sy = wl_fixed_from_double(surf_pos.c.y);
|
||||
|
|
@ -3848,6 +3849,9 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
|||
wl_resource_set_implementation(resource, &seat_interface, data,
|
||||
unbind_resource);
|
||||
|
||||
if (version >= WL_SEAT_NAME_SINCE_VERSION)
|
||||
wl_seat_send_name(resource, seat->seat_name);
|
||||
|
||||
if (weston_seat_get_pointer(seat))
|
||||
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||
if (weston_seat_get_keyboard(seat))
|
||||
|
|
@ -3856,8 +3860,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
|||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||
|
||||
wl_seat_send_capabilities(resource, caps);
|
||||
if (version >= WL_SEAT_NAME_SINCE_VERSION)
|
||||
wl_seat_send_name(resource, seat->seat_name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -4608,6 +4610,14 @@ enable_pointer_constraint(struct weston_pointer_constraint *constraint,
|
|||
struct weston_view *view)
|
||||
{
|
||||
assert(constraint->view == NULL);
|
||||
|
||||
if (!constraint->pointer->focus ||
|
||||
constraint->pointer->focus->surface != constraint->surface) {
|
||||
weston_log("WARNING: Not enabling constraint because "
|
||||
"pointer focus doesn't match\n");
|
||||
return;
|
||||
}
|
||||
|
||||
constraint->view = view;
|
||||
pointer_constraint_notify_activated(constraint);
|
||||
weston_pointer_start_grab(constraint->pointer, &constraint->grab);
|
||||
|
|
|
|||
|
|
@ -94,6 +94,12 @@ noop_renderer_attach(struct weston_paint_node *pnode)
|
|||
}
|
||||
|
||||
shm_buffer = buffer->shm_buffer;
|
||||
/* This can happen if a SHM wl_buffer gets destroyed before we attach,
|
||||
* because wayland-server just nukes the wl_shm_buffer from underneath
|
||||
* us. */
|
||||
if (!shm_buffer)
|
||||
return;
|
||||
|
||||
data = wl_shm_buffer_get_data(shm_buffer);
|
||||
stride = buffer->stride;
|
||||
height = buffer->height;
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ struct weston_capture_task {
|
|||
|
||||
struct weston_buffer *buffer;
|
||||
struct wl_listener buffer_resource_destroy_listener;
|
||||
|
||||
struct wl_signal destroy_signal;
|
||||
};
|
||||
|
||||
/** Buffer requirements broadcasting for a pixel source */
|
||||
|
|
@ -299,6 +301,8 @@ buffer_is_compatible(struct weston_buffer *buffer,
|
|||
static void
|
||||
weston_capture_task_destroy(struct weston_capture_task *ct)
|
||||
{
|
||||
wl_signal_emit(&ct->destroy_signal, ct);
|
||||
|
||||
if (ct->owner->pixel_source != WESTON_OUTPUT_CAPTURE_SOURCE_WRITEBACK &&
|
||||
ct->owner->output)
|
||||
weston_output_disable_planes_decr(ct->owner->output);
|
||||
|
|
@ -345,6 +349,8 @@ weston_capture_task_create(struct weston_capture_source *csrc,
|
|||
if (ct->owner->pixel_source != WESTON_OUTPUT_CAPTURE_SOURCE_WRITEBACK)
|
||||
weston_output_disable_planes_incr(ct->owner->output);
|
||||
|
||||
wl_signal_init(&ct->destroy_signal);
|
||||
|
||||
return ct;
|
||||
}
|
||||
|
||||
|
|
@ -698,3 +704,16 @@ weston_compositor_add_screenshot_authority(struct weston_compositor *compositor,
|
|||
listener->notify = (wl_notify_func_t)auth;
|
||||
wl_signal_add(&compositor->output_capture.ask_auth, listener);
|
||||
}
|
||||
|
||||
/* Add a capture task destroy listener
|
||||
* \param task The capture task
|
||||
* \listener The listener to call when the task is destroyed
|
||||
*
|
||||
* Add a listener for capture task destruction.
|
||||
*/
|
||||
WL_EXPORT void
|
||||
weston_capture_task_add_destroy_listener(struct weston_capture_task *task,
|
||||
struct wl_listener *listener)
|
||||
{
|
||||
wl_signal_add(&task->destroy_signal, listener);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,9 @@ weston_capture_task_retire_failed(struct weston_capture_task *ct,
|
|||
void
|
||||
weston_capture_task_retire_complete(struct weston_capture_task *ct);
|
||||
|
||||
void
|
||||
weston_capture_task_add_destroy_listener(struct weston_capture_task *ct,
|
||||
struct wl_listener *listener);
|
||||
|
||||
/*
|
||||
* entry point for weston_compositor
|
||||
|
|
|
|||
|
|
@ -3616,7 +3616,8 @@ gl_renderer_buffer_init(struct weston_compositor *etc,
|
|||
{
|
||||
struct gl_buffer_state *gb;
|
||||
|
||||
if (buffer->type != WESTON_BUFFER_DMABUF)
|
||||
if (buffer->type != WESTON_BUFFER_DMABUF ||
|
||||
(buffer->type == WESTON_BUFFER_DMABUF && buffer->direct_display))
|
||||
return;
|
||||
|
||||
/* Thanks to linux-dmabuf being totally independent of libweston,
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ output_run(uint32_t *p, uint32_t delta, int run)
|
|||
#if defined(HAVE_BUILTIN_CLZ)
|
||||
i = 24 - __builtin_clz(run);
|
||||
#else
|
||||
for (i = 0, tmp = u >> 8; tmp; i++, tmp >>= 1);
|
||||
for (i = 0, tmp = run >> 8; tmp; i++, tmp >>= 1);
|
||||
#endif
|
||||
*p++ = delta | ((i + 0xe0) << 24);
|
||||
run -= 1 << (7 + i);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
project('weston',
|
||||
'c',
|
||||
version: '14.0.0',
|
||||
version: '14.0.3',
|
||||
default_options: [
|
||||
'warning_level=3',
|
||||
'c_std=gnu99',
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ weston_config_get_binding_modifier(struct weston_config *config,
|
|||
weston_config_section_get_string(shell_section,
|
||||
"binding-modifier", &mod_string, "super");
|
||||
|
||||
if (!mod_string || !strcmp(mod_string, "none"))
|
||||
if (!mod_string)
|
||||
mod = default_mod;
|
||||
else if (!strcmp(mod_string, "super"))
|
||||
mod = MODIFIER_SUPER;
|
||||
|
|
@ -610,6 +610,8 @@ weston_config_get_binding_modifier(struct weston_config *config,
|
|||
mod = MODIFIER_CTRL;
|
||||
else if (!strcmp(mod_string, "shift"))
|
||||
mod = MODIFIER_SHIFT;
|
||||
else if (!strcmp(mod_string, "none"))
|
||||
mod = 0;
|
||||
|
||||
free(mod_string);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ lib_lcms_util = static_library(
|
|||
[ 'lcms_util.c' ],
|
||||
include_directories: common_inc,
|
||||
dependencies: [
|
||||
dep_lcms2, dep_libm
|
||||
dep_lcms2, dep_libm, dep_wayland_server
|
||||
],
|
||||
build_by_default: false,
|
||||
install: false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue