build: Enable -Werror=shadow and fix related issues
Mostly renames or removing already defined types Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3378>
This commit is contained in:
parent
e509fc7f00
commit
fc623c1ed1
@ -353,16 +353,14 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||||||
|
|
||||||
if (!_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
|
if (!_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
|
||||||
{
|
{
|
||||||
CoglFrameInfo *info;
|
g_autoptr (CoglFrameInfo) pending_info = NULL;
|
||||||
|
|
||||||
g_warn_if_fail (priv->pending_frame_infos.length == 1);
|
g_warn_if_fail (priv->pending_frame_infos.length == 1);
|
||||||
|
|
||||||
info = g_queue_pop_tail (&priv->pending_frame_infos);
|
pending_info = g_queue_pop_tail (&priv->pending_frame_infos);
|
||||||
|
|
||||||
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_SYNC, info);
|
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_SYNC, pending_info);
|
||||||
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_COMPLETE, info);
|
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_COMPLETE, pending_info);
|
||||||
|
|
||||||
g_object_unref (info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->frame_counter++;
|
priv->frame_counter++;
|
||||||
@ -413,16 +411,14 @@ cogl_onscreen_swap_region (CoglOnscreen *onscreen,
|
|||||||
|
|
||||||
if (!_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
|
if (!_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
|
||||||
{
|
{
|
||||||
CoglFrameInfo *info;
|
g_autoptr (CoglFrameInfo) pending_info = NULL;
|
||||||
|
|
||||||
g_warn_if_fail (priv->pending_frame_infos.length == 1);
|
g_warn_if_fail (priv->pending_frame_infos.length == 1);
|
||||||
|
|
||||||
info = g_queue_pop_tail (&priv->pending_frame_infos);
|
pending_info = g_queue_pop_tail (&priv->pending_frame_infos);
|
||||||
|
|
||||||
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_SYNC, info);
|
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_SYNC, pending_info);
|
||||||
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_COMPLETE, info);
|
_cogl_onscreen_queue_event (onscreen, COGL_FRAME_EVENT_COMPLETE, pending_info);
|
||||||
|
|
||||||
g_object_unref (info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->frame_counter++;
|
priv->frame_counter++;
|
||||||
|
@ -414,7 +414,6 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
|
|||||||
if (driver_override != COGL_DRIVER_ANY)
|
if (driver_override != COGL_DRIVER_ANY)
|
||||||
{
|
{
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (_cogl_drivers); i++)
|
for (i = 0; i < G_N_ELEMENTS (_cogl_drivers); i++)
|
||||||
{
|
{
|
||||||
|
@ -326,13 +326,12 @@ cogl_onscreen_egl_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||||||
and just returns an error if this is not the case so we can't
|
and just returns an error if this is not the case so we can't
|
||||||
just pretend this isn't in the spec. */
|
just pretend this isn't in the spec. */
|
||||||
cogl_context_flush_framebuffer_state (context,
|
cogl_context_flush_framebuffer_state (context,
|
||||||
COGL_FRAMEBUFFER (onscreen),
|
framebuffer,
|
||||||
COGL_FRAMEBUFFER (onscreen),
|
framebuffer,
|
||||||
COGL_FRAMEBUFFER_STATE_BIND);
|
COGL_FRAMEBUFFER_STATE_BIND);
|
||||||
|
|
||||||
if (n_rectangles && priv->pf_eglSwapBuffersWithDamage)
|
if (n_rectangles && priv->pf_eglSwapBuffersWithDamage)
|
||||||
{
|
{
|
||||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
|
||||||
size_t size = n_rectangles * sizeof (int) * 4;
|
size_t size = n_rectangles * sizeof (int) * 4;
|
||||||
int *flipped = alloca (size);
|
int *flipped = alloca (size);
|
||||||
int i;
|
int i;
|
||||||
|
@ -784,7 +784,6 @@ cogl_onscreen_glx_swap_region (CoglOnscreen *onscreen,
|
|||||||
|
|
||||||
drawable =
|
drawable =
|
||||||
onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
|
onscreen_glx->glxwin ? onscreen_glx->glxwin : onscreen_glx->xwin;
|
||||||
int i;
|
|
||||||
for (i = 0; i < n_rectangles; i++)
|
for (i = 0; i < n_rectangles; i++)
|
||||||
{
|
{
|
||||||
int *rect = &rectangles[4 * i];
|
int *rect = &rectangles[4 * i];
|
||||||
@ -794,7 +793,6 @@ cogl_onscreen_glx_swap_region (CoglOnscreen *onscreen,
|
|||||||
}
|
}
|
||||||
else if (context->glBlitFramebuffer)
|
else if (context->glBlitFramebuffer)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
/* XXX: checkout how this state interacts with the code to use
|
/* XXX: checkout how this state interacts with the code to use
|
||||||
* glBlitFramebuffer in Neil's texture atlasing branch */
|
* glBlitFramebuffer in Neil's texture atlasing branch */
|
||||||
|
|
||||||
|
@ -526,6 +526,7 @@ if buildtype != 'plain'
|
|||||||
'-Wno-unused-parameter',
|
'-Wno-unused-parameter',
|
||||||
'-Wno-missing-field-initializers',
|
'-Wno-missing-field-initializers',
|
||||||
'-Wno-type-limits',
|
'-Wno-type-limits',
|
||||||
|
'-Wshadow',
|
||||||
]
|
]
|
||||||
|
|
||||||
if get_option('debug')
|
if get_option('debug')
|
||||||
|
@ -370,15 +370,15 @@ meta_dbus_session_manager_create_session (MetaDbusSessionManager *session_manag
|
|||||||
GValue value = G_VALUE_INIT;
|
GValue value = G_VALUE_INIT;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GType ptype;
|
GType ptype;
|
||||||
gchar *error = NULL;
|
gchar *error_message = NULL;
|
||||||
|
|
||||||
pspec = g_object_class_find_property (object_class,
|
pspec = g_object_class_find_property (object_class,
|
||||||
property_name);
|
property_name);
|
||||||
g_assert (pspec);
|
g_assert (pspec);
|
||||||
|
|
||||||
ptype = G_PARAM_SPEC_VALUE_TYPE (pspec);
|
ptype = G_PARAM_SPEC_VALUE_TYPE (pspec);
|
||||||
G_VALUE_COLLECT_INIT (&value, ptype, var_args, 0, &error);
|
G_VALUE_COLLECT_INIT (&value, ptype, var_args, 0, &error_message);
|
||||||
g_assert (!error);
|
g_assert (!error_message);
|
||||||
|
|
||||||
g_array_append_val (names, property_name);
|
g_array_append_val (names, property_name);
|
||||||
g_array_append_val (values, value);
|
g_array_append_val (values, value);
|
||||||
|
@ -1453,7 +1453,6 @@ meta_input_capture_session_process_event (MetaInputCaptureSession *session,
|
|||||||
ClutterScrollFinishFlags finish_flags;
|
ClutterScrollFinishFlags finish_flags;
|
||||||
const double factor = 10.0;
|
const double factor = 10.0;
|
||||||
bool stop_x = false, stop_y = false;
|
bool stop_x = false, stop_y = false;
|
||||||
double dx, dy;
|
|
||||||
|
|
||||||
if (!session->eis_pointer)
|
if (!session->eis_pointer)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -171,11 +171,11 @@ meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
|
|||||||
|
|
||||||
for (l = logical_monitor->monitors; l; l = l->next)
|
for (l = logical_monitor->monitors; l; l = l->next)
|
||||||
{
|
{
|
||||||
MetaMonitor *monitor = l->data;
|
MetaMonitor *other_monitor = l->data;
|
||||||
GList *outputs;
|
GList *outputs;
|
||||||
GList *l_output;
|
GList *l_output;
|
||||||
|
|
||||||
outputs = meta_monitor_get_outputs (monitor);
|
outputs = meta_monitor_get_outputs (other_monitor);
|
||||||
for (l_output = outputs; l_output; l_output = l_output->next)
|
for (l_output = outputs; l_output; l_output = l_output->next)
|
||||||
{
|
{
|
||||||
MetaOutput *output = l_output->data;
|
MetaOutput *output = l_output->data;
|
||||||
|
@ -1321,12 +1321,12 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
|
|||||||
|
|
||||||
for (l = monitors; l; l = l->next)
|
for (l = monitors; l; l = l->next)
|
||||||
{
|
{
|
||||||
MetaMonitor *monitor = l->data;
|
MetaMonitor *other_monitor = l->data;
|
||||||
MetaMonitorMode *mode = NULL;
|
MetaMonitorMode *mode = NULL;
|
||||||
GList *ll;
|
GList *ll;
|
||||||
float scale;
|
float scale;
|
||||||
|
|
||||||
for (ll = meta_monitor_get_modes (monitor); ll; ll = ll->next)
|
for (ll = meta_monitor_get_modes (other_monitor); ll; ll = ll->next)
|
||||||
{
|
{
|
||||||
gint mode_w, mode_h;
|
gint mode_w, mode_h;
|
||||||
|
|
||||||
@ -1340,10 +1340,10 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
|
|||||||
if (!mode)
|
if (!mode)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
scale = compute_scale_for_monitor (config_manager, monitor,
|
scale = compute_scale_for_monitor (config_manager, other_monitor,
|
||||||
primary_monitor);
|
primary_monitor);
|
||||||
best_scale = MAX (best_scale, scale);
|
best_scale = MAX (best_scale, scale);
|
||||||
monitor_configs = g_list_prepend (monitor_configs, create_monitor_config (monitor, mode));
|
monitor_configs = g_list_prepend (monitor_configs, create_monitor_config (other_monitor, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
scale_logical_monitor_width (layout_mode, best_scale,
|
scale_logical_monitor_width (layout_mode, best_scale,
|
||||||
|
@ -2657,7 +2657,7 @@ create_logical_monitor_config_from_variant (MetaMonitorManager *manager
|
|||||||
gboolean is_primary;
|
gboolean is_primary;
|
||||||
GVariantIter *monitor_configs_iter;
|
GVariantIter *monitor_configs_iter;
|
||||||
GList *monitor_configs = NULL;
|
GList *monitor_configs = NULL;
|
||||||
MetaMonitorConfig *monitor_config;
|
MetaMonitorConfig *first_monitor_config;
|
||||||
|
|
||||||
g_variant_get (logical_monitor_config_variant, LOGICAL_MONITOR_CONFIG_FORMAT,
|
g_variant_get (logical_monitor_config_variant, LOGICAL_MONITOR_CONFIG_FORMAT,
|
||||||
&x,
|
&x,
|
||||||
@ -2702,16 +2702,16 @@ create_logical_monitor_config_from_variant (MetaMonitorManager *manager
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor_config = monitor_configs->data;
|
first_monitor_config = monitor_configs->data;
|
||||||
if (!find_monitor_mode_scale (manager,
|
if (!find_monitor_mode_scale (manager,
|
||||||
layout_mode,
|
layout_mode,
|
||||||
monitor_config,
|
first_monitor_config,
|
||||||
scale,
|
scale,
|
||||||
&scale,
|
&scale,
|
||||||
error))
|
error))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (!derive_logical_monitor_size (monitor_config, &width, &height,
|
if (!derive_logical_monitor_size (first_monitor_config, &width, &height,
|
||||||
scale, transform, layout_mode, error))
|
scale, transform, layout_mode, error))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/* Till https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3915 is fixed */
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wshadow"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@ -1826,3 +1829,5 @@ meta_screen_cast_stream_src_get_preferred_format (MetaScreenCastStreamSrc *src)
|
|||||||
|
|
||||||
return klass->get_preferred_format (src);
|
return klass->get_preferred_format (src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
@ -635,8 +635,6 @@ ensure_virtual_monitor (MetaScreenCastVirtualStreamSrc *virtual_src,
|
|||||||
virtual_monitor = create_virtual_monitor (virtual_src, video_format, &error);
|
virtual_monitor = create_virtual_monitor (virtual_src, video_format, &error);
|
||||||
if (!virtual_monitor)
|
if (!virtual_monitor)
|
||||||
{
|
{
|
||||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (virtual_src);
|
|
||||||
|
|
||||||
g_warning ("Failed to create virtual monitor with size %dx%d: %s",
|
g_warning ("Failed to create virtual monitor with size %dx%d: %s",
|
||||||
video_format->size.width, video_format->size.height,
|
video_format->size.width, video_format->size.height,
|
||||||
error->message);
|
error->message);
|
||||||
|
@ -655,7 +655,7 @@ init_gpus (MetaBackendNative *native,
|
|||||||
for (l = devices; l; l = l->next)
|
for (l = devices; l; l = l->next)
|
||||||
{
|
{
|
||||||
GUdevDevice *device = l->data;
|
GUdevDevice *device = l->data;
|
||||||
GError *local_error = NULL;
|
GError *device_error = NULL;
|
||||||
|
|
||||||
if (should_ignore_device (native, device))
|
if (should_ignore_device (native, device))
|
||||||
{
|
{
|
||||||
@ -664,25 +664,25 @@ init_gpus (MetaBackendNative *native,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!add_drm_device (native, device, &local_error))
|
if (!add_drm_device (native, device, &device_error))
|
||||||
{
|
{
|
||||||
if (meta_backend_is_headless (backend) &&
|
if (meta_backend_is_headless (backend) &&
|
||||||
g_error_matches (local_error, G_IO_ERROR,
|
g_error_matches (device_error, G_IO_ERROR,
|
||||||
G_IO_ERROR_PERMISSION_DENIED))
|
G_IO_ERROR_PERMISSION_DENIED))
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_BACKEND,
|
meta_topic (META_DEBUG_BACKEND,
|
||||||
"Ignoring unavailable gpu '%s': %s'",
|
"Ignoring unavailable gpu '%s': %s'",
|
||||||
g_udev_device_get_device_file (device),
|
g_udev_device_get_device_file (device),
|
||||||
local_error->message);
|
device_error->message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Failed to open gpu '%s': %s",
|
g_warning ("Failed to open gpu '%s': %s",
|
||||||
g_udev_device_get_device_file (device),
|
g_udev_device_get_device_file (device),
|
||||||
local_error->message);
|
device_error->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_clear_error (&local_error);
|
g_clear_error (&device_error);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -475,15 +475,15 @@ update_filter_cb (MetaKmsImpl *impl,
|
|||||||
for (i = 0; i < crtc_states->len; i++)
|
for (i = 0; i < crtc_states->len; i++)
|
||||||
{
|
{
|
||||||
CrtcStateImpl *crtc_state_impl = g_ptr_array_index (crtc_states, i);
|
CrtcStateImpl *crtc_state_impl = g_ptr_array_index (crtc_states, i);
|
||||||
MetaKmsCrtc *crtc = crtc_state_impl->crtc;
|
MetaKmsCrtc *state_crtc = crtc_state_impl->crtc;
|
||||||
MetaDrmBuffer *old_buffer = NULL;
|
MetaDrmBuffer *old_buffer = NULL;
|
||||||
|
|
||||||
if (meta_kms_crtc_get_device (crtc) !=
|
if (meta_kms_crtc_get_device (state_crtc) !=
|
||||||
meta_kms_update_get_device (update))
|
meta_kms_update_get_device (update))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
update = maybe_update_cursor_plane (cursor_manager_impl,
|
update = maybe_update_cursor_plane (cursor_manager_impl,
|
||||||
crtc, update, &old_buffer);
|
state_crtc, update, &old_buffer);
|
||||||
if (old_buffer)
|
if (old_buffer)
|
||||||
old_buffers = g_list_prepend (old_buffers, old_buffer);
|
old_buffers = g_list_prepend (old_buffers, old_buffer);
|
||||||
}
|
}
|
||||||
|
@ -672,7 +672,7 @@ process_plane_assignment (MetaKmsImplDevice *impl_device,
|
|||||||
struct {
|
struct {
|
||||||
MetaKmsPlaneProp prop;
|
MetaKmsPlaneProp prop;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
} props[] = {
|
} cursor_props[] = {
|
||||||
{
|
{
|
||||||
.prop = META_KMS_PLANE_PROP_HOTSPOT_X,
|
.prop = META_KMS_PLANE_PROP_HOTSPOT_X,
|
||||||
.value = plane_assignment->cursor_hotspot.is_valid ?
|
.value = plane_assignment->cursor_hotspot.is_valid ?
|
||||||
@ -687,12 +687,12 @@ process_plane_assignment (MetaKmsImplDevice *impl_device,
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (props); i++)
|
for (i = 0; i < G_N_ELEMENTS (cursor_props); i++)
|
||||||
{
|
{
|
||||||
if (!add_plane_property (impl_device,
|
if (!add_plane_property (impl_device,
|
||||||
plane, req,
|
plane, req,
|
||||||
props[i].prop,
|
cursor_props[i].prop,
|
||||||
props[i].value,
|
cursor_props[i].value,
|
||||||
error))
|
error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -785,7 +785,6 @@ retry_page_flips (gpointer user_data)
|
|||||||
|
|
||||||
if (impl_device_simple->pending_page_flip_retries)
|
if (impl_device_simple->pending_page_flip_retries)
|
||||||
{
|
{
|
||||||
GList *l;
|
|
||||||
uint64_t earliest_retry_time_us = 0;
|
uint64_t earliest_retry_time_us = 0;
|
||||||
|
|
||||||
for (l = impl_device_simple->pending_page_flip_retries; l; l = l->next)
|
for (l = impl_device_simple->pending_page_flip_retries; l; l = l->next)
|
||||||
|
@ -164,10 +164,10 @@ meta_monitor_manager_native_ensure_initial_config (MetaMonitorManager *manager)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
apply_crtc_assignments (MetaMonitorManager *manager,
|
apply_crtc_assignments (MetaMonitorManager *manager,
|
||||||
MetaCrtcAssignment **crtcs,
|
MetaCrtcAssignment **crtc_assignments,
|
||||||
unsigned int n_crtcs,
|
unsigned int n_crtc_assignments,
|
||||||
MetaOutputAssignment **outputs,
|
MetaOutputAssignment **output_assignments,
|
||||||
unsigned int n_outputs)
|
unsigned int n_output_assignments)
|
||||||
{
|
{
|
||||||
MetaBackend *backend = meta_monitor_manager_get_backend (manager);
|
MetaBackend *backend = meta_monitor_manager_get_backend (manager);
|
||||||
g_autoptr (GList) to_configure_outputs = NULL;
|
g_autoptr (GList) to_configure_outputs = NULL;
|
||||||
@ -200,9 +200,9 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
|||||||
to_configure_crtcs = g_list_append (to_configure_crtcs, crtc);
|
to_configure_crtcs = g_list_append (to_configure_crtcs, crtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < n_crtcs; i++)
|
for (i = 0; i < n_crtc_assignments; i++)
|
||||||
{
|
{
|
||||||
MetaCrtcAssignment *crtc_assignment = crtcs[i];
|
MetaCrtcAssignment *crtc_assignment = crtc_assignments[i];
|
||||||
MetaCrtc *crtc = crtc_assignment->crtc;
|
MetaCrtc *crtc = crtc_assignment->crtc;
|
||||||
|
|
||||||
to_configure_crtcs = g_list_remove (to_configure_crtcs, crtc);
|
to_configure_crtcs = g_list_remove (to_configure_crtcs, crtc);
|
||||||
@ -231,8 +231,8 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
|||||||
to_configure_outputs = g_list_remove (to_configure_outputs,
|
to_configure_outputs = g_list_remove (to_configure_outputs,
|
||||||
output);
|
output);
|
||||||
|
|
||||||
output_assignment = meta_find_output_assignment (outputs,
|
output_assignment = meta_find_output_assignment (output_assignments,
|
||||||
n_outputs,
|
n_output_assignments,
|
||||||
output);
|
output);
|
||||||
meta_output_assign_crtc (output, crtc, output_assignment);
|
meta_output_assign_crtc (output, crtc, output_assignment);
|
||||||
}
|
}
|
||||||
|
@ -94,12 +94,12 @@ can_blit_buffer (ContextData *context_data,
|
|||||||
|
|
||||||
for (i = 0; i < context_data->buffer_support->len; i++)
|
for (i = 0; i < context_data->buffer_support->len; i++)
|
||||||
{
|
{
|
||||||
BufferTypeSupport *support =
|
BufferTypeSupport *other_support =
|
||||||
&g_array_index (context_data->buffer_support, BufferTypeSupport, i);
|
&g_array_index (context_data->buffer_support, BufferTypeSupport, i);
|
||||||
|
|
||||||
if (support->drm_format == drm_format &&
|
if (other_support->drm_format == drm_format &&
|
||||||
support->drm_modifier == drm_modifier)
|
other_support->drm_modifier == drm_modifier)
|
||||||
return support->can_blit;
|
return other_support->can_blit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!meta_egl_has_extensions (egl, egl_display, NULL,
|
if (!meta_egl_has_extensions (egl, egl_display, NULL,
|
||||||
|
@ -863,12 +863,12 @@ meta_thread_flush_callbacks (MetaThread *thread)
|
|||||||
g_mutex_lock (&priv->callbacks_mutex);
|
g_mutex_lock (&priv->callbacks_mutex);
|
||||||
for (i = 0; i < main_thread_sources->len; i++)
|
for (i = 0; i < main_thread_sources->len; i++)
|
||||||
{
|
{
|
||||||
MetaThreadCallbackSource *source =
|
MetaThreadCallbackSource *callback_source =
|
||||||
g_ptr_array_index (main_thread_sources, i);
|
g_ptr_array_index (main_thread_sources, i);
|
||||||
|
|
||||||
pending_callbacks =
|
pending_callbacks =
|
||||||
g_list_concat (pending_callbacks,
|
g_list_concat (pending_callbacks,
|
||||||
g_steal_pointer (&source->callbacks));
|
g_steal_pointer (&callback_source->callbacks));
|
||||||
}
|
}
|
||||||
|
|
||||||
callback_sources = g_hash_table_get_values (priv->callback_sources);
|
callback_sources = g_hash_table_get_values (priv->callback_sources);
|
||||||
|
@ -408,7 +408,6 @@ meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *x11,
|
|||||||
{
|
{
|
||||||
MetaCompositor *compositor = display->compositor;
|
MetaCompositor *compositor = display->compositor;
|
||||||
MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor);
|
MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor);
|
||||||
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
|
|
||||||
|
|
||||||
if (meta_dnd_handle_xdnd_event (backend, compositor_x11,
|
if (meta_dnd_handle_xdnd_event (backend, compositor_x11,
|
||||||
xdisplay, event))
|
xdisplay, event))
|
||||||
|
@ -2297,7 +2297,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
|||||||
|
|
||||||
if (clutter_input_device_get_device_type (source_device) == CLUTTER_PAD_DEVICE)
|
if (clutter_input_device_get_device_type (source_device) == CLUTTER_PAD_DEVICE)
|
||||||
{
|
{
|
||||||
uint32_t button, group = 0, mode = 0;
|
uint32_t pad_button, group = 0, mode = 0;
|
||||||
|
|
||||||
/* We got these events because of the passive button grab */
|
/* We got these events because of the passive button grab */
|
||||||
XIAllowEvents (xdisplay, xev->sourceid, XIAsyncDevice, xev->time);
|
XIAllowEvents (xdisplay, xev->sourceid, XIAsyncDevice, xev->time);
|
||||||
@ -2316,11 +2316,11 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
|||||||
xev->detail -= 4;
|
xev->detail -= 4;
|
||||||
|
|
||||||
/* Pad buttons are 0-indexed */
|
/* Pad buttons are 0-indexed */
|
||||||
button = xev->detail - 1;
|
pad_button = xev->detail - 1;
|
||||||
|
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
meta_input_device_x11_update_pad_state (device,
|
meta_input_device_x11_update_pad_state (device,
|
||||||
button,
|
pad_button,
|
||||||
(xi_event->evtype == XI_ButtonPress),
|
(xi_event->evtype == XI_ButtonPress),
|
||||||
&group,
|
&group,
|
||||||
&mode);
|
&mode);
|
||||||
@ -2332,7 +2332,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
|||||||
CLUTTER_EVENT_NONE,
|
CLUTTER_EVENT_NONE,
|
||||||
us2ms (xev->time),
|
us2ms (xev->time),
|
||||||
source_device,
|
source_device,
|
||||||
button,
|
pad_button,
|
||||||
group,
|
group,
|
||||||
mode);
|
mode);
|
||||||
|
|
||||||
@ -2345,7 +2345,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
|||||||
meta_input_device_x11_get_device_id (device),
|
meta_input_device_x11_get_device_id (device),
|
||||||
clutter_input_device_get_device_name (device),
|
clutter_input_device_get_device_name (device),
|
||||||
xev->time,
|
xev->time,
|
||||||
button);
|
pad_button);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,7 +853,6 @@ do_paint_content (MetaShapedTexture *stex,
|
|||||||
if (blended_tex_region)
|
if (blended_tex_region)
|
||||||
{
|
{
|
||||||
/* 1) blended_tex_region is not empty. Paint the rectangles. */
|
/* 1) blended_tex_region is not empty. Paint the rectangles. */
|
||||||
int i;
|
|
||||||
int n_rects = mtk_region_num_rectangles (blended_tex_region);
|
int n_rects = mtk_region_num_rectangles (blended_tex_region);
|
||||||
|
|
||||||
for (i = 0; i < n_rects; i++)
|
for (i = 0; i < n_rects; i++)
|
||||||
|
@ -255,9 +255,9 @@ meta_window_actor_wayland_rebuild_surface_tree (MetaWindowActor *actor)
|
|||||||
|
|
||||||
if (!g_list_find (surface_actors, child_actor))
|
if (!g_list_find (surface_actors, child_actor))
|
||||||
{
|
{
|
||||||
MetaSurfaceActor *surface_actor = META_SURFACE_ACTOR (child_actor);
|
MetaSurfaceActor *child_surface_actor = META_SURFACE_ACTOR (child_actor);
|
||||||
|
|
||||||
meta_window_actor_remove_surface_actor (actor, surface_actor);
|
meta_window_actor_remove_surface_actor (actor, child_surface_actor);
|
||||||
clutter_actor_remove_child (CLUTTER_ACTOR (self->surface_container),
|
clutter_actor_remove_child (CLUTTER_ACTOR (self->surface_container),
|
||||||
child_actor);
|
child_actor);
|
||||||
}
|
}
|
||||||
|
@ -1900,21 +1900,21 @@ meta_display_ping_window (MetaWindow *window,
|
|||||||
|
|
||||||
for (l = display->pending_pings; l; l = l->next)
|
for (l = display->pending_pings; l; l = l->next)
|
||||||
{
|
{
|
||||||
MetaPingData *ping_data = l->data;
|
MetaPingData *pending_ping_data = l->data;
|
||||||
|
|
||||||
if (window == ping_data->window)
|
if (window == pending_ping_data->window)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_PING,
|
meta_topic (META_DEBUG_PING,
|
||||||
"Window %s already is being pinged with serial %u",
|
"Window %s already is being pinged with serial %u",
|
||||||
window->desc, ping_data->serial);
|
window->desc, pending_ping_data->serial);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serial == ping_data->serial)
|
if (serial == pending_ping_data->serial)
|
||||||
{
|
{
|
||||||
meta_warning ("Ping serial %u was reused for window %s, "
|
meta_warning ("Ping serial %u was reused for window %s, "
|
||||||
"previous use was for window %s.",
|
"previous use was for window %s.",
|
||||||
serial, window->desc, ping_data->window->desc);
|
serial, window->desc, pending_ping_data->window->desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3239,9 +3239,9 @@ check_fullscreen_func (gpointer data)
|
|||||||
{
|
{
|
||||||
/* DOCK window stacking depends on the monitor's fullscreen
|
/* DOCK window stacking depends on the monitor's fullscreen
|
||||||
status so we need to trigger a re-layering. */
|
status so we need to trigger a re-layering. */
|
||||||
MetaWindow *window = meta_stack_get_top (display->stack);
|
MetaWindow *top_window = meta_stack_get_top (display->stack);
|
||||||
if (window)
|
if (top_window)
|
||||||
meta_stack_update_layer (display->stack, window);
|
meta_stack_update_layer (display->stack, top_window);
|
||||||
|
|
||||||
g_signal_emit (display, display_signals[IN_FULLSCREEN_CHANGED], 0, NULL);
|
g_signal_emit (display, display_signals[IN_FULLSCREEN_CHANGED], 0, NULL);
|
||||||
}
|
}
|
||||||
|
@ -333,10 +333,6 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
|
|
||||||
if (event_type == CLUTTER_MOTION)
|
if (event_type == CLUTTER_MOTION)
|
||||||
{
|
{
|
||||||
ClutterInputDevice *device;
|
|
||||||
|
|
||||||
device = clutter_event_get_device (event);
|
|
||||||
|
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
if (wayland_compositor)
|
if (wayland_compositor)
|
||||||
{
|
{
|
||||||
|
@ -496,9 +496,7 @@ before_frame_frame_clock_before_frame (ClutterFrameClock *frame_clock,
|
|||||||
ClutterFrame *frame,
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
int64_t *expected_frame_count = user_data;
|
g_assert_cmpint (expected_frame_count, ==, clutter_frame_get_count (frame));
|
||||||
|
|
||||||
g_assert_cmpint (*expected_frame_count, ==, clutter_frame_get_count (frame));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClutterFrameResult
|
static ClutterFrameResult
|
||||||
@ -506,12 +504,11 @@ before_frame_frame_clock_frame (ClutterFrameClock *frame_clock,
|
|||||||
ClutterFrame *frame,
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
int64_t *expected_frame_count = user_data;
|
|
||||||
ClutterFrameInfo frame_info;
|
ClutterFrameInfo frame_info;
|
||||||
|
|
||||||
g_assert_cmpint (*expected_frame_count, ==, clutter_frame_get_count (frame));
|
g_assert_cmpint (expected_frame_count, ==, clutter_frame_get_count (frame));
|
||||||
|
|
||||||
(*expected_frame_count)++;
|
expected_frame_count++;
|
||||||
|
|
||||||
init_frame_info (&frame_info, g_get_monotonic_time ());
|
init_frame_info (&frame_info, g_get_monotonic_time ());
|
||||||
clutter_frame_clock_notify_presented (frame_clock, &frame_info);
|
clutter_frame_clock_notify_presented (frame_clock, &frame_info);
|
||||||
|
@ -191,7 +191,7 @@ set_shader_num (int new_no)
|
|||||||
{
|
{
|
||||||
CoglShader *shader;
|
CoglShader *shader;
|
||||||
CoglProgram *program;
|
CoglProgram *program;
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *shader_pipeline;
|
||||||
CoglContext *ctx =
|
CoglContext *ctx =
|
||||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
int image_width = cogl_texture_get_width (redhand);
|
int image_width = cogl_texture_get_width (redhand);
|
||||||
@ -202,7 +202,7 @@ set_shader_num (int new_no)
|
|||||||
new_no,
|
new_no,
|
||||||
shaders[new_no].name);
|
shaders[new_no].name);
|
||||||
|
|
||||||
pipeline = cogl_pipeline_new (ctx);
|
shader_pipeline = cogl_pipeline_new (ctx);
|
||||||
|
|
||||||
shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
|
shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
|
||||||
cogl_shader_source (shader, shaders[new_no].source);
|
cogl_shader_source (shader, shaders[new_no].source);
|
||||||
@ -226,7 +226,7 @@ set_shader_num (int new_no)
|
|||||||
uniform_no = cogl_program_get_uniform_location (program, "y_step");
|
uniform_no = cogl_program_get_uniform_location (program, "y_step");
|
||||||
cogl_program_set_uniform_1f (program, uniform_no, 1.0f / image_height);
|
cogl_program_set_uniform_1f (program, uniform_no, 1.0f / image_height);
|
||||||
|
|
||||||
cogl_pipeline_set_user_program (pipeline, program);
|
cogl_pipeline_set_user_program (shader_pipeline, program);
|
||||||
g_object_unref (program);
|
g_object_unref (program);
|
||||||
|
|
||||||
shader_no = new_no;
|
shader_no = new_no;
|
||||||
@ -314,7 +314,7 @@ test_cogl_shader_glsl_main (int argc, char *argv[])
|
|||||||
char *file;
|
char *file;
|
||||||
GError *error;
|
GError *error;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *shader_pipeline;
|
||||||
CoglContext *ctx =
|
CoglContext *ctx =
|
||||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
|
|
||||||
@ -333,8 +333,8 @@ test_cogl_shader_glsl_main (int argc, char *argv[])
|
|||||||
if (redhand == NULL)
|
if (redhand == NULL)
|
||||||
g_error ("image load failed: %s", error->message);
|
g_error ("image load failed: %s", error->message);
|
||||||
|
|
||||||
pipeline = cogl_pipeline_new (ctx);
|
shader_pipeline = cogl_pipeline_new (ctx);
|
||||||
cogl_pipeline_set_layer_texture (pipeline, 0, redhand);
|
cogl_pipeline_set_layer_texture (shader_pipeline, 0, redhand);
|
||||||
|
|
||||||
set_shader_num (0);
|
set_shader_num (0);
|
||||||
g_signal_connect (actor, "paint", G_CALLBACK (on_paint), NULL);
|
g_signal_connect (actor, "paint", G_CALLBACK (on_paint), NULL);
|
||||||
|
@ -78,14 +78,14 @@ test_utils_compare_pixel (const uint8_t *screen_pixel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_utils_check_pixel (CoglFramebuffer *test_fb,
|
test_utils_check_pixel (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
uint32_t expected_pixel)
|
uint32_t expected_pixel)
|
||||||
{
|
{
|
||||||
uint8_t pixel[4];
|
uint8_t pixel[4];
|
||||||
|
|
||||||
cogl_framebuffer_read_pixels (test_fb,
|
cogl_framebuffer_read_pixels (framebuffer,
|
||||||
x, y, 1, 1,
|
x, y, 1, 1,
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
||||||
pixel);
|
pixel);
|
||||||
@ -94,14 +94,14 @@ test_utils_check_pixel (CoglFramebuffer *test_fb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_utils_check_pixel_and_alpha (CoglFramebuffer *test_fb,
|
test_utils_check_pixel_and_alpha (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
uint32_t expected_pixel)
|
uint32_t expected_pixel)
|
||||||
{
|
{
|
||||||
uint8_t pixel[4];
|
uint8_t pixel[4];
|
||||||
|
|
||||||
cogl_framebuffer_read_pixels (test_fb,
|
cogl_framebuffer_read_pixels (framebuffer,
|
||||||
x, y, 1, 1,
|
x, y, 1, 1,
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
||||||
pixel);
|
pixel);
|
||||||
@ -110,7 +110,7 @@ test_utils_check_pixel_and_alpha (CoglFramebuffer *test_fb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_utils_check_pixel_rgb (CoglFramebuffer *test_fb,
|
test_utils_check_pixel_rgb (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int r,
|
int r,
|
||||||
@ -124,14 +124,14 @@ test_utils_check_pixel_rgb (CoglFramebuffer *test_fb,
|
|||||||
g_return_if_fail (g <= 0xFF);
|
g_return_if_fail (g <= 0xFF);
|
||||||
g_return_if_fail (b <= 0xFF);
|
g_return_if_fail (b <= 0xFF);
|
||||||
|
|
||||||
test_utils_check_pixel (test_fb, x, y,
|
test_utils_check_pixel (framebuffer, x, y,
|
||||||
(((guint32) r) << 24) |
|
(((guint32) r) << 24) |
|
||||||
(((guint32) g) << 16) |
|
(((guint32) g) << 16) |
|
||||||
(((guint32) b) << 8));
|
(((guint32) b) << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_utils_check_region (CoglFramebuffer *test_fb,
|
test_utils_check_region (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@ -141,7 +141,7 @@ test_utils_check_region (CoglFramebuffer *test_fb,
|
|||||||
uint8_t *pixels, *p;
|
uint8_t *pixels, *p;
|
||||||
|
|
||||||
pixels = p = g_malloc (width * height * 4);
|
pixels = p = g_malloc (width * height * 4);
|
||||||
cogl_framebuffer_read_pixels (test_fb,
|
cogl_framebuffer_read_pixels (framebuffer,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
width,
|
width,
|
||||||
|
@ -33,7 +33,7 @@ calc_coord_offset (int pos, int pos_index, int point_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
verify_point_size (CoglFramebuffer *test_fb,
|
verify_point_size (CoglFramebuffer *framebuffer,
|
||||||
int x_pos,
|
int x_pos,
|
||||||
int y_pos,
|
int y_pos,
|
||||||
int point_size)
|
int point_size)
|
||||||
@ -46,7 +46,7 @@ verify_point_size (CoglFramebuffer *test_fb,
|
|||||||
gboolean in_point = x >= 1 && x <= 2 && y >= 1 && y <= 2;
|
gboolean in_point = x >= 1 && x <= 2 && y >= 1 && y <= 2;
|
||||||
uint32_t expected_pixel = in_point ? 0x00ff00ff : 0xff0000ff;
|
uint32_t expected_pixel = in_point ? 0x00ff00ff : 0xff0000ff;
|
||||||
|
|
||||||
test_utils_check_pixel (test_fb,
|
test_utils_check_pixel (framebuffer,
|
||||||
calc_coord_offset (x_pos, x, point_size),
|
calc_coord_offset (x_pos, x, point_size),
|
||||||
calc_coord_offset (y_pos, y, point_size),
|
calc_coord_offset (y_pos, y, point_size),
|
||||||
expected_pixel);
|
expected_pixel);
|
||||||
|
@ -25,7 +25,7 @@ calc_coord_offset (int pos, int pos_index, int point_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
verify_point_size (CoglFramebuffer *test_fb,
|
verify_point_size (CoglFramebuffer *framebuffer,
|
||||||
int x_pos,
|
int x_pos,
|
||||||
int y_pos,
|
int y_pos,
|
||||||
int point_size)
|
int point_size)
|
||||||
@ -38,7 +38,7 @@ verify_point_size (CoglFramebuffer *test_fb,
|
|||||||
gboolean in_point = x >= 1 && x <= 2 && y >= 1 && y <= 2;
|
gboolean in_point = x >= 1 && x <= 2 && y >= 1 && y <= 2;
|
||||||
uint32_t expected_pixel = in_point ? 0x00ff00ff : 0xff0000ff;
|
uint32_t expected_pixel = in_point ? 0x00ff00ff : 0xff0000ff;
|
||||||
|
|
||||||
test_utils_check_pixel (test_fb,
|
test_utils_check_pixel (framebuffer,
|
||||||
calc_coord_offset (x_pos, x, point_size),
|
calc_coord_offset (x_pos, x, point_size),
|
||||||
calc_coord_offset (y_pos, y, point_size),
|
calc_coord_offset (y_pos, y, point_size),
|
||||||
expected_pixel);
|
expected_pixel);
|
||||||
|
@ -543,10 +543,10 @@ meta_check_monitor_configuration (MetaContext *context,
|
|||||||
all_crtcs = NULL;
|
all_crtcs = NULL;
|
||||||
for (l = meta_backend_get_gpus (backend); l; l = l->next)
|
for (l = meta_backend_get_gpus (backend); l; l = l->next)
|
||||||
{
|
{
|
||||||
MetaGpu *gpu = l->data;
|
MetaGpu *current_gpu = l->data;
|
||||||
|
|
||||||
all_crtcs = g_list_concat (all_crtcs,
|
all_crtcs = g_list_concat (all_crtcs,
|
||||||
g_list_copy (meta_gpu_get_crtcs (gpu)));
|
g_list_copy (meta_gpu_get_crtcs (current_gpu)));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < expect->n_logical_monitors; i++)
|
for (i = 0; i < expect->n_logical_monitors; i++)
|
||||||
|
@ -1080,7 +1080,7 @@ meta_test_thread_change_thread_type (void)
|
|||||||
MetaThread *thread;
|
MetaThread *thread;
|
||||||
g_autoptr (GError) error = NULL;
|
g_autoptr (GError) error = NULL;
|
||||||
GThread *main_thread;
|
GThread *main_thread;
|
||||||
GThread *test_thread;
|
GThread *thread_test;
|
||||||
|
|
||||||
thread = g_initable_new (META_TYPE_THREAD_TEST,
|
thread = g_initable_new (META_TYPE_THREAD_TEST,
|
||||||
NULL, &error,
|
NULL, &error,
|
||||||
@ -1094,27 +1094,27 @@ meta_test_thread_change_thread_type (void)
|
|||||||
|
|
||||||
main_thread = g_thread_self ();
|
main_thread = g_thread_self ();
|
||||||
|
|
||||||
test_thread = main_thread;
|
thread_test = main_thread;
|
||||||
meta_thread_post_impl_task (thread, assert_not_thread, &test_thread, NULL,
|
meta_thread_post_impl_task (thread, assert_not_thread, &thread_test, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
meta_thread_reset_thread_type (thread, META_THREAD_TYPE_USER);
|
meta_thread_reset_thread_type (thread, META_THREAD_TYPE_USER);
|
||||||
g_assert_null (test_thread);
|
g_assert_null (thread_test);
|
||||||
|
|
||||||
test_thread = main_thread;
|
thread_test = main_thread;
|
||||||
meta_thread_post_impl_task (thread, assert_thread, &test_thread, NULL,
|
meta_thread_post_impl_task (thread, assert_thread, &thread_test, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
meta_thread_reset_thread_type (thread, META_THREAD_TYPE_KERNEL);
|
meta_thread_reset_thread_type (thread, META_THREAD_TYPE_KERNEL);
|
||||||
g_assert_null (test_thread);
|
g_assert_null (thread_test);
|
||||||
|
|
||||||
test_thread = main_thread;
|
thread_test = main_thread;
|
||||||
meta_thread_post_impl_task (thread, assert_not_thread, &test_thread, NULL,
|
meta_thread_post_impl_task (thread, assert_not_thread, &thread_test, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
g_object_unref (thread);
|
g_object_unref (thread);
|
||||||
g_assert_null (thread);
|
g_assert_null (thread);
|
||||||
g_assert_null (test_thread);
|
g_assert_null (thread_test);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GVariant *
|
static GVariant *
|
||||||
|
@ -122,7 +122,7 @@ static const struct xdg_surface_listener xdg_surface_listener = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void handle_preferred_scale (void *data,
|
static void handle_preferred_scale (void *data,
|
||||||
struct wp_fractional_scale_v1 *fractional_scale_obj,
|
struct wp_fractional_scale_v1 *fractional_scale,
|
||||||
uint32_t wire_scale)
|
uint32_t wire_scale)
|
||||||
{
|
{
|
||||||
WaylandDisplay *display = data;
|
WaylandDisplay *display = data;
|
||||||
|
@ -100,7 +100,7 @@ static void
|
|||||||
pointer_handle_enter (void *data,
|
pointer_handle_enter (void *data,
|
||||||
struct wl_pointer *pointer,
|
struct wl_pointer *pointer,
|
||||||
uint32_t serial,
|
uint32_t serial,
|
||||||
struct wl_surface *surface,
|
struct wl_surface *wl_surface,
|
||||||
wl_fixed_t sx,
|
wl_fixed_t sx,
|
||||||
wl_fixed_t sy)
|
wl_fixed_t sy)
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ static void
|
|||||||
pointer_handle_leave (void *data,
|
pointer_handle_leave (void *data,
|
||||||
struct wl_pointer *pointer,
|
struct wl_pointer *pointer,
|
||||||
uint32_t serial,
|
uint32_t serial,
|
||||||
struct wl_surface *surface)
|
struct wl_surface *wl_surface)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,12 +167,12 @@ static const struct wl_pointer_listener pointer_listener = {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
seat_handle_capabilities (void *data,
|
seat_handle_capabilities (void *data,
|
||||||
struct wl_seat *wl_seat,
|
struct wl_seat *seat,
|
||||||
enum wl_seat_capability caps)
|
enum wl_seat_capability caps)
|
||||||
{
|
{
|
||||||
if (caps & WL_SEAT_CAPABILITY_POINTER)
|
if (caps & WL_SEAT_CAPABILITY_POINTER)
|
||||||
{
|
{
|
||||||
wl_pointer = wl_seat_get_pointer (wl_seat);
|
wl_pointer = wl_seat_get_pointer (seat);
|
||||||
wl_pointer_add_listener (wl_pointer, &pointer_listener, NULL);
|
wl_pointer_add_listener (wl_pointer, &pointer_listener, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,14 +249,14 @@ main (int argc,
|
|||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
g_autoptr (WaylandDisplay) display = NULL;
|
g_autoptr (WaylandDisplay) display = NULL;
|
||||||
struct wl_registry *wl_registry;
|
struct wl_registry *registry;
|
||||||
struct xdg_toplevel *xdg_toplevel;
|
struct xdg_toplevel *xdg_toplevel;
|
||||||
struct xdg_surface *xdg_surface;
|
struct xdg_surface *xdg_surface;
|
||||||
struct wl_cursor_theme *cursor_theme;
|
struct wl_cursor_theme *cursor_theme;
|
||||||
|
|
||||||
display = wayland_display_new (WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER);
|
display = wayland_display_new (WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER);
|
||||||
wl_registry = wl_display_get_registry (display->display);
|
registry = wl_display_get_registry (display->display);
|
||||||
wl_registry_add_listener (wl_registry, ®istry_listener, display);
|
wl_registry_add_listener (registry, ®istry_listener, display);
|
||||||
wl_display_roundtrip (display->display);
|
wl_display_roundtrip (display->display);
|
||||||
|
|
||||||
g_signal_connect (display, "sync-event", G_CALLBACK (on_sync_event), NULL);
|
g_signal_connect (display, "sync-event", G_CALLBACK (on_sync_event), NULL);
|
||||||
|
@ -32,9 +32,6 @@ typedef enum _ServiceClientType
|
|||||||
SERVICE_CLIENT_TYPE_PORTAL_BACKEND,
|
SERVICE_CLIENT_TYPE_PORTAL_BACKEND,
|
||||||
} ServiceClientType;
|
} ServiceClientType;
|
||||||
|
|
||||||
static WaylandDisplay *display;
|
|
||||||
static WaylandSurface *surface;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_sync_event (WaylandDisplay *display,
|
on_sync_event (WaylandDisplay *display,
|
||||||
uint32_t serial,
|
uint32_t serial,
|
||||||
@ -51,6 +48,9 @@ main (int argc,
|
|||||||
g_autoptr (MetaDBusServiceChannel) service_channel = NULL;
|
g_autoptr (MetaDBusServiceChannel) service_channel = NULL;
|
||||||
g_autoptr (GVariant) fd_variant = NULL;
|
g_autoptr (GVariant) fd_variant = NULL;
|
||||||
g_autoptr (GUnixFDList) fd_list = NULL;
|
g_autoptr (GUnixFDList) fd_list = NULL;
|
||||||
|
g_autoptr (WaylandDisplay) display = NULL;
|
||||||
|
g_autoptr (WaylandSurface) surface = NULL;
|
||||||
|
|
||||||
int fd;
|
int fd;
|
||||||
struct wl_display *wayland_display;
|
struct wl_display *wayland_display;
|
||||||
uint32_t last_sync_event = UINT32_MAX;
|
uint32_t last_sync_event = UINT32_MAX;
|
||||||
@ -89,7 +89,4 @@ main (int argc,
|
|||||||
|
|
||||||
while (last_sync_event != 1)
|
while (last_sync_event != 1)
|
||||||
wayland_display_dispatch (display);
|
wayland_display_dispatch (display);
|
||||||
|
|
||||||
g_object_unref (surface);
|
|
||||||
g_object_unref (display);
|
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
#include "wayland-test-client-utils.h"
|
#include "wayland-test-client-utils.h"
|
||||||
|
|
||||||
static struct wl_seat *seat;
|
static struct wl_seat *wl_seat;
|
||||||
static struct wl_pointer *pointer;
|
static struct wl_pointer *wl_pointer;
|
||||||
|
|
||||||
static struct wl_surface *toplevel_surface;
|
static struct wl_surface *toplevel_surface;
|
||||||
static struct xdg_surface *toplevel_xdg_surface;
|
static struct xdg_surface *toplevel_xdg_surface;
|
||||||
@ -183,7 +183,7 @@ pointer_handle_button (void *data,
|
|||||||
xdg_popup = xdg_surface_get_popup (popup_xdg_surface, toplevel_xdg_surface,
|
xdg_popup = xdg_surface_get_popup (popup_xdg_surface, toplevel_xdg_surface,
|
||||||
positioner);
|
positioner);
|
||||||
xdg_positioner_destroy (positioner);
|
xdg_positioner_destroy (positioner);
|
||||||
xdg_popup_grab (xdg_popup, seat, serial);
|
xdg_popup_grab (xdg_popup, wl_seat, serial);
|
||||||
wl_surface_commit (popup_surface);
|
wl_surface_commit (popup_surface);
|
||||||
|
|
||||||
if (click_count == 1)
|
if (click_count == 1)
|
||||||
@ -218,15 +218,15 @@ static const struct wl_pointer_listener pointer_listener = {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
seat_handle_capabilities (void *data,
|
seat_handle_capabilities (void *data,
|
||||||
struct wl_seat *wl_seat,
|
struct wl_seat *seat,
|
||||||
enum wl_seat_capability caps)
|
enum wl_seat_capability caps)
|
||||||
{
|
{
|
||||||
WaylandDisplay *display = data;
|
WaylandDisplay *display = data;
|
||||||
|
|
||||||
if (caps & WL_SEAT_CAPABILITY_POINTER)
|
if (caps & WL_SEAT_CAPABILITY_POINTER)
|
||||||
{
|
{
|
||||||
pointer = wl_seat_get_pointer (wl_seat);
|
wl_pointer = wl_seat_get_pointer (seat);
|
||||||
wl_pointer_add_listener (pointer, &pointer_listener, display);
|
wl_pointer_add_listener (wl_pointer, &pointer_listener, display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,8 +271,8 @@ handle_registry_global (void *data,
|
|||||||
|
|
||||||
if (strcmp (interface, "wl_seat") == 0)
|
if (strcmp (interface, "wl_seat") == 0)
|
||||||
{
|
{
|
||||||
seat = wl_registry_bind (registry, id, &wl_seat_interface, 1);
|
wl_seat = wl_registry_bind (registry, id, &wl_seat_interface, 1);
|
||||||
wl_seat_add_listener (seat, &seat_listener, display);
|
wl_seat_add_listener (wl_seat, &seat_listener, display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,16 +96,16 @@ draw_subsurface (WaylandDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_configure (void *data,
|
handle_xdg_toplevel_configure (void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *test_xdg_toplevel,
|
||||||
int32_t width,
|
int32_t width,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *state)
|
struct wl_array *configure_state)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_close(void *data,
|
handle_xdg_toplevel_close(void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel)
|
struct xdg_toplevel *test_xdg_toplevel)
|
||||||
{
|
{
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
@ -61,16 +61,16 @@ draw_subsurface (WaylandDisplay *display)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_configure (void *data,
|
handle_xdg_toplevel_configure (void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *test_xdg_toplevel,
|
||||||
int32_t width,
|
int32_t width,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *state)
|
struct wl_array *configure_state)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_close(void *data,
|
handle_xdg_toplevel_close(void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel)
|
struct xdg_toplevel *test_xdg_toplevel)
|
||||||
{
|
{
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ static const struct wl_callback_listener frame_listener = {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_surface_configure (void *data,
|
handle_xdg_surface_configure (void *data,
|
||||||
struct xdg_surface *xdg_surface,
|
struct xdg_surface *test_xdg_surface,
|
||||||
uint32_t serial)
|
uint32_t serial)
|
||||||
{
|
{
|
||||||
WaylandDisplay *display = data;
|
WaylandDisplay *display = data;
|
||||||
@ -161,7 +161,7 @@ handle_xdg_surface_configure (void *data,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xdg_surface_ack_configure (xdg_surface, serial);
|
xdg_surface_ack_configure (test_xdg_surface, serial);
|
||||||
frame_callback = wl_surface_frame (surface);
|
frame_callback = wl_surface_frame (surface);
|
||||||
wl_callback_add_listener (frame_callback, &frame_listener, display);
|
wl_callback_add_listener (frame_callback, &frame_listener, display);
|
||||||
wl_surface_commit (surface);
|
wl_surface_commit (surface);
|
||||||
|
@ -97,16 +97,16 @@ draw_subsurface (WaylandDisplay *display,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_configure (void *data,
|
handle_xdg_toplevel_configure (void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *test_xdg_toplevel,
|
||||||
int32_t width,
|
int32_t width,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *state)
|
struct wl_array *configure_state)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handle_xdg_toplevel_close (void *data,
|
handle_xdg_toplevel_close (void *data,
|
||||||
struct xdg_toplevel *xdg_toplevel)
|
struct xdg_toplevel *test_xdg_toplevel)
|
||||||
{
|
{
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ handle_xdg_toplevel_configure (void *data,
|
|||||||
struct xdg_toplevel *xdg_toplevel,
|
struct xdg_toplevel *xdg_toplevel,
|
||||||
int32_t width,
|
int32_t width,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *state)
|
struct wl_array *configure_state)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#include "wayland-test-client-utils.h"
|
#include "wayland-test-client-utils.h"
|
||||||
|
|
||||||
static struct wl_surface *surface;
|
static struct wl_surface *surface;
|
||||||
static struct xdg_surface *xdg_surface;
|
|
||||||
static struct xdg_toplevel *xdg_toplevel;
|
|
||||||
|
|
||||||
static gboolean waiting_for_configure = FALSE;
|
static gboolean waiting_for_configure = FALSE;
|
||||||
|
|
||||||
@ -191,6 +189,8 @@ main (int argc,
|
|||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
g_autoptr (WaylandDisplay) display = NULL;
|
g_autoptr (WaylandDisplay) display = NULL;
|
||||||
|
struct xdg_surface *xdg_surface;
|
||||||
|
struct xdg_toplevel *xdg_toplevel;
|
||||||
display = wayland_display_new (WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER);
|
display = wayland_display_new (WAYLAND_DISPLAY_CAPABILITY_TEST_DRIVER);
|
||||||
|
|
||||||
surface = wl_compositor_create_surface (display->compositor);
|
surface = wl_compositor_create_surface (display->compositor);
|
||||||
|
@ -423,13 +423,13 @@ on_window_added (MetaStack *stack,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
on_window_actor_destroyed (MetaWindowActor *actor,
|
on_window_actor_destroyed (MetaWindowActor *actor,
|
||||||
MetaWaylandTestDriver *test_driver)
|
MetaWaylandTestDriver *driver)
|
||||||
{
|
{
|
||||||
meta_wayland_test_driver_emit_sync_event (test_driver, 0);
|
meta_wayland_test_driver_emit_sync_event (driver, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_unmap_sync_point (MetaWaylandTestDriver *test_driver,
|
on_unmap_sync_point (MetaWaylandTestDriver *driver,
|
||||||
unsigned int sequence,
|
unsigned int sequence,
|
||||||
struct wl_resource *surface_resource,
|
struct wl_resource *surface_resource,
|
||||||
struct wl_client *wl_client)
|
struct wl_client *wl_client)
|
||||||
@ -456,7 +456,7 @@ on_unmap_sync_point (MetaWaylandTestDriver *test_driver,
|
|||||||
MetaWindowActor *window_actor = meta_window_actor_from_actor (actor);
|
MetaWindowActor *window_actor = meta_window_actor_from_actor (actor);
|
||||||
g_signal_connect (window_actor, "destroy",
|
g_signal_connect (window_actor, "destroy",
|
||||||
G_CALLBACK (on_window_actor_destroyed),
|
G_CALLBACK (on_window_actor_destroyed),
|
||||||
test_driver);
|
driver);
|
||||||
}
|
}
|
||||||
else if (sequence == 1)
|
else if (sequence == 1)
|
||||||
{
|
{
|
||||||
@ -877,7 +877,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_toplevel_suspended_sync_point (MetaWaylandTestDriver *test_driver,
|
on_toplevel_suspended_sync_point (MetaWaylandTestDriver *driver,
|
||||||
unsigned int sequence,
|
unsigned int sequence,
|
||||||
struct wl_resource *surface_resource,
|
struct wl_resource *surface_resource,
|
||||||
struct wl_client *wl_client)
|
struct wl_client *wl_client)
|
||||||
|
@ -277,10 +277,10 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
|
|||||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||||
subsurface_surface)
|
subsurface_surface)
|
||||||
{
|
{
|
||||||
MetaWaylandActorSurface *actor_surface;
|
MetaWaylandActorSurface *actor_subsurface;
|
||||||
|
|
||||||
actor_surface = META_WAYLAND_ACTOR_SURFACE (subsurface_surface->role);
|
actor_subsurface = META_WAYLAND_ACTOR_SURFACE (subsurface_surface->role);
|
||||||
meta_wayland_actor_surface_sync_actor_state (actor_surface);
|
meta_wayland_actor_surface_sync_actor_state (actor_subsurface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,11 +419,11 @@ meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface)
|
|||||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||||
subsurface_surface)
|
subsurface_surface)
|
||||||
{
|
{
|
||||||
MetaWaylandActorSurface *actor_surface;
|
MetaWaylandActorSurface *actor_subsurface;
|
||||||
|
|
||||||
actor_surface = META_WAYLAND_ACTOR_SURFACE (subsurface_surface->role);
|
actor_subsurface = META_WAYLAND_ACTOR_SURFACE (subsurface_surface->role);
|
||||||
meta_wayland_actor_surface_reset_actor (actor_surface);
|
meta_wayland_actor_surface_reset_actor (actor_subsurface);
|
||||||
meta_wayland_actor_surface_sync_actor_state (actor_surface);
|
meta_wayland_actor_surface_sync_actor_state (actor_subsurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_surface_actor (actor_surface);
|
clear_surface_actor (actor_surface);
|
||||||
|
@ -95,10 +95,6 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
|
|||||||
|
|
||||||
if (!meta_wayland_surface_is_xwayland (surface))
|
if (!meta_wayland_surface_is_xwayland (surface))
|
||||||
{
|
{
|
||||||
MetaWaylandSurfaceRole *surface_role =
|
|
||||||
META_WAYLAND_SURFACE_ROLE (cursor_surface);
|
|
||||||
MetaWaylandSurface *surface =
|
|
||||||
meta_wayland_surface_role_get_surface (surface_role);
|
|
||||||
MetaContext *context =
|
MetaContext *context =
|
||||||
meta_wayland_compositor_get_context (surface->compositor);
|
meta_wayland_compositor_get_context (surface->compositor);
|
||||||
MetaBackend *backend = meta_context_get_backend (context);
|
MetaBackend *backend = meta_context_get_backend (context);
|
||||||
|
@ -462,15 +462,15 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
|
|||||||
CoglEglImageFlags flags;
|
CoglEglImageFlags flags;
|
||||||
CoglTexture *cogl_texture;
|
CoglTexture *cogl_texture;
|
||||||
uint32_t drm_format = 0;
|
uint32_t drm_format = 0;
|
||||||
const MetaFormatInfo *format_info;
|
const MetaFormatInfo *plane_format_info;
|
||||||
int plane_index = mt_format_info->plane_indices[i];
|
int plane_index = mt_format_info->plane_indices[i];
|
||||||
CoglPixelFormat subformat = mt_format_info->subformats[i];
|
CoglPixelFormat subformat = mt_format_info->subformats[i];
|
||||||
int horizontal_factor = mt_format_info->hsub[i];
|
int horizontal_factor = mt_format_info->hsub[i];
|
||||||
int vertical_factor = mt_format_info->vsub[i];
|
int vertical_factor = mt_format_info->vsub[i];
|
||||||
|
|
||||||
format_info = meta_format_info_from_cogl_format (subformat);
|
plane_format_info = meta_format_info_from_cogl_format (subformat);
|
||||||
g_return_val_if_fail (format_info != NULL, FALSE);
|
g_return_val_if_fail (plane_format_info != NULL, FALSE);
|
||||||
drm_format = format_info->drm_format;
|
drm_format = plane_format_info->drm_format;
|
||||||
|
|
||||||
egl_image = meta_egl_create_dmabuf_image (egl,
|
egl_image = meta_egl_create_dmabuf_image (egl,
|
||||||
egl_display,
|
egl_display,
|
||||||
|
@ -132,10 +132,10 @@ meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
|||||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||||
subsurface_surface)
|
subsurface_surface)
|
||||||
{
|
{
|
||||||
MetaWaylandSubsurface *subsurface;
|
MetaWaylandSubsurface *sub_surface;
|
||||||
|
|
||||||
subsurface = META_WAYLAND_SUBSURFACE (subsurface_surface->role);
|
sub_surface = META_WAYLAND_SUBSURFACE (subsurface_surface->role);
|
||||||
meta_wayland_subsurface_union_geometry (subsurface,
|
meta_wayland_subsurface_union_geometry (sub_surface,
|
||||||
parent_x + geometry.x,
|
parent_x + geometry.x,
|
||||||
parent_y + geometry.y,
|
parent_y + geometry.y,
|
||||||
out_geometry);
|
out_geometry);
|
||||||
|
@ -356,7 +356,6 @@ meta_wayland_tablet_tool_set_focus (MetaWaylandTabletTool *tool,
|
|||||||
|
|
||||||
if (!wl_list_empty (l))
|
if (!wl_list_empty (l))
|
||||||
{
|
{
|
||||||
struct wl_client *client = wl_resource_get_client (tool->focus_surface->resource);
|
|
||||||
struct wl_display *display = wl_client_get_display (client);
|
struct wl_display *display = wl_client_get_display (client);
|
||||||
|
|
||||||
tool->proximity_serial = wl_display_next_serial (display);
|
tool->proximity_serial = wl_display_next_serial (display);
|
||||||
|
@ -456,8 +456,6 @@ meta_wayland_transaction_commit (MetaWaylandTransaction *transaction)
|
|||||||
{
|
{
|
||||||
if (surface->transaction.first_committed)
|
if (surface->transaction.first_committed)
|
||||||
{
|
{
|
||||||
MetaWaylandTransactionEntry *entry;
|
|
||||||
|
|
||||||
entry = g_hash_table_lookup (surface->transaction.last_committed->entries,
|
entry = g_hash_table_lookup (surface->transaction.last_committed->entries,
|
||||||
surface);
|
surface);
|
||||||
entry->next_transaction = transaction;
|
entry->next_transaction = transaction;
|
||||||
|
@ -415,6 +415,7 @@ xserver_died (GObject *source,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
g_warning ("Failed to finish waiting for Xwayland: %s", error->message);
|
g_warning ("Failed to finish waiting for Xwayland: %s", error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
}
|
}
|
||||||
|
|
||||||
x11_display_policy =
|
x11_display_policy =
|
||||||
@ -433,8 +434,6 @@ xserver_died (GObject *source,
|
|||||||
}
|
}
|
||||||
else if (x11_display_policy == META_X11_DISPLAY_POLICY_ON_DEMAND)
|
else if (x11_display_policy == META_X11_DISPLAY_POLICY_ON_DEMAND)
|
||||||
{
|
{
|
||||||
g_autoptr (GError) error = NULL;
|
|
||||||
|
|
||||||
if (display->x11_display)
|
if (display->x11_display)
|
||||||
meta_display_shutdown_x11 (display);
|
meta_display_shutdown_x11 (display);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user