Compare commits
11 Commits
3.35.3
...
benzea/use
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ac8066a743 | ||
![]() |
c4fa30ac7d | ||
![]() |
84ea4ad990 | ||
![]() |
64685f4b20 | ||
![]() |
bf594e9fb6 | ||
![]() |
3958e75ed2 | ||
![]() |
802309caf9 | ||
![]() |
468b09c01e | ||
![]() |
c13ea4f48d | ||
![]() |
1e7285b2bb | ||
![]() |
a8cb84c711 |
@@ -121,12 +121,12 @@ G_DEFINE_TYPE (ClutterBrightnessContrastEffect,
|
||||
static gboolean
|
||||
will_have_no_effect (ClutterBrightnessContrastEffect *self)
|
||||
{
|
||||
return (self->brightness_red == no_change &&
|
||||
self->brightness_green == no_change &&
|
||||
self->brightness_blue == no_change &&
|
||||
self->contrast_red == no_change &&
|
||||
self->contrast_green == no_change &&
|
||||
self->contrast_blue == no_change);
|
||||
return (G_APPROX_VALUE (self->brightness_red, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->brightness_green, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->brightness_blue, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_red, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_green, no_change, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (self->contrast_blue, no_change, FLT_EPSILON));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -497,9 +497,9 @@ clutter_brightness_contrast_effect_set_brightness_full (ClutterBrightnessContras
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||
|
||||
if (red == effect->brightness_red &&
|
||||
green == effect->brightness_green &&
|
||||
blue == effect->brightness_blue)
|
||||
if (G_APPROX_VALUE (red, effect->brightness_red, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (green, effect->brightness_green, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (blue, effect->brightness_blue, FLT_EPSILON))
|
||||
return;
|
||||
|
||||
effect->brightness_red = red;
|
||||
@@ -587,9 +587,9 @@ clutter_brightness_contrast_effect_set_contrast_full (ClutterBrightnessContrastE
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT (effect));
|
||||
|
||||
if (red == effect->contrast_red &&
|
||||
green == effect->contrast_green &&
|
||||
blue == effect->contrast_blue)
|
||||
if (G_APPROX_VALUE (red, effect->contrast_red, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (green, effect->contrast_green, FLT_EPSILON) &&
|
||||
G_APPROX_VALUE (blue, effect->contrast_blue, FLT_EPSILON))
|
||||
return;
|
||||
|
||||
effect->contrast_red = red;
|
||||
|
@@ -118,11 +118,7 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
|
||||
meta_class->set_actor (meta, actor);
|
||||
|
||||
/* clear out the previous state */
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_object_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
/* we keep a back pointer here, to avoid going through the ActorMeta */
|
||||
priv->actor = clutter_actor_meta_get_actor (meta);
|
||||
@@ -198,17 +194,8 @@ update_fbo (ClutterEffect *effect,
|
||||
ensure_pipeline_filter_for_scale (self, resource_scale);
|
||||
}
|
||||
|
||||
if (priv->texture != NULL)
|
||||
{
|
||||
cogl_object_unref (priv->texture);
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_object_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
priv->texture =
|
||||
clutter_offscreen_effect_create_texture (self, target_width, target_height);
|
||||
@@ -487,29 +474,44 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
|
||||
*/
|
||||
if (priv->offscreen == NULL || (flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY))
|
||||
{
|
||||
/* Chain up to the parent paint method which will call the pre and
|
||||
post paint functions to update the image */
|
||||
CLUTTER_EFFECT_CLASS (clutter_offscreen_effect_parent_class)->
|
||||
paint (effect, paint_context, flags);
|
||||
ClutterEffectClass *effect_class = CLUTTER_EFFECT_GET_CLASS (effect);
|
||||
gboolean pre_paint_succeeded;
|
||||
|
||||
pre_paint_succeeded = effect_class->pre_paint (effect, paint_context);
|
||||
|
||||
clutter_actor_continue_paint (priv->actor, paint_context);
|
||||
|
||||
if (pre_paint_succeeded)
|
||||
effect_class->post_paint (effect, paint_context);
|
||||
else
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
}
|
||||
else
|
||||
clutter_offscreen_effect_paint_texture (self, paint_context);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_notify (GObject *gobject,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ClutterOffscreenEffect *offscreen_effect = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
||||
ClutterOffscreenEffectPrivate *priv = offscreen_effect->priv;
|
||||
|
||||
if (strcmp (pspec->name, "enabled") == 0)
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->notify (gobject, pspec);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_offscreen_effect_finalize (GObject *gobject)
|
||||
{
|
||||
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (gobject);
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
|
||||
if (priv->offscreen)
|
||||
cogl_object_unref (priv->offscreen);
|
||||
|
||||
if (priv->target)
|
||||
cogl_object_unref (priv->target);
|
||||
|
||||
if (priv->texture)
|
||||
cogl_object_unref (priv->texture);
|
||||
g_clear_pointer (&priv->offscreen, cogl_object_unref);
|
||||
g_clear_pointer (&priv->texture, cogl_object_unref);
|
||||
g_clear_pointer (&priv->target, cogl_object_unref);
|
||||
|
||||
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->finalize (gobject);
|
||||
}
|
||||
@@ -531,6 +533,7 @@ clutter_offscreen_effect_class_init (ClutterOffscreenEffectClass *klass)
|
||||
effect_class->paint = clutter_offscreen_effect_paint;
|
||||
|
||||
gobject_class->finalize = clutter_offscreen_effect_finalize;
|
||||
gobject_class->notify = clutter_offscreen_effect_notify;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -517,6 +517,33 @@ update_touchpad_disable_while_typing (MetaInputSettings *input_settings,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
device_is_tablet_touchpad (MetaInputSettings *input_settings,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
#ifdef HAVE_LIBWACOM
|
||||
WacomIntegrationFlags flags = 0;
|
||||
WacomDevice *wacom_device;
|
||||
|
||||
if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
|
||||
return FALSE;
|
||||
|
||||
wacom_device =
|
||||
meta_input_settings_get_tablet_wacom_device (input_settings,
|
||||
device);
|
||||
if (wacom_device)
|
||||
{
|
||||
flags = libwacom_get_integration_flags (wacom_device);
|
||||
|
||||
if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
||||
WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
||||
ClutterInputDevice *device)
|
||||
@@ -531,7 +558,8 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
|
||||
|
||||
priv = meta_input_settings_get_instance_private (input_settings);
|
||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||
enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
g_settings_get_boolean (priv->touchpad_settings, "tap-to-click");
|
||||
|
||||
if (device)
|
||||
{
|
||||
@@ -561,7 +589,8 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
|
||||
|
||||
priv = meta_input_settings_get_instance_private (input_settings);
|
||||
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
|
||||
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||
enabled = device_is_tablet_touchpad (input_settings, device) ||
|
||||
g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
|
||||
|
||||
if (device)
|
||||
{
|
||||
|
@@ -227,6 +227,7 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaLogicalMonitor *cur = current;
|
||||
float x = cur_x, y = cur_y;
|
||||
float target_x = cur_x, target_y = cur_y;
|
||||
float dx = *dx_inout, dy = *dy_inout;
|
||||
MetaDisplayDirection direction = -1;
|
||||
|
||||
@@ -256,6 +257,9 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
||||
{ cur->rect.x + cur->rect.width, cur->rect.y + cur->rect.height }
|
||||
};
|
||||
|
||||
target_x = motion.b.x;
|
||||
target_y = motion.b.y;
|
||||
|
||||
if (direction != META_DISPLAY_RIGHT &&
|
||||
meta_line2_intersects_with (&motion, &left, &intersection))
|
||||
direction = META_DISPLAY_LEFT;
|
||||
@@ -269,12 +273,8 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
||||
meta_line2_intersects_with (&motion, &bottom, &intersection))
|
||||
direction = META_DISPLAY_DOWN;
|
||||
else
|
||||
{
|
||||
/* We reached the dest logical monitor */
|
||||
x = motion.b.x;
|
||||
y = motion.b.y;
|
||||
break;
|
||||
}
|
||||
/* We reached the dest logical monitor */
|
||||
break;
|
||||
|
||||
x = intersection.x;
|
||||
y = intersection.y;
|
||||
@@ -285,8 +285,8 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
|
||||
cur, direction);
|
||||
}
|
||||
|
||||
*dx_inout = x - cur_x;
|
||||
*dy_inout = y - cur_y;
|
||||
*dx_inout = target_x - cur_x;
|
||||
*dy_inout = target_y - cur_y;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -957,20 +957,28 @@ meta_window_actor_cull_out (MetaCullable *cullable,
|
||||
|
||||
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
|
||||
|
||||
if (unobscured_region && meta_window_actor_is_opaque (self))
|
||||
if ((unobscured_region || clip_region) && meta_window_actor_is_opaque (self))
|
||||
{
|
||||
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
|
||||
|
||||
if (region)
|
||||
{
|
||||
cairo_region_subtract (unobscured_region, region);
|
||||
if (unobscured_region)
|
||||
cairo_region_subtract (unobscured_region, region);
|
||||
if (clip_region)
|
||||
cairo_region_subtract (clip_region, region);
|
||||
}
|
||||
else
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
meta_window_get_frame_rect (priv->window, &rect);
|
||||
rect.x = rect.y = 0;
|
||||
cairo_region_subtract_rectangle (unobscured_region, &rect);
|
||||
|
||||
if (unobscured_region)
|
||||
cairo_region_subtract_rectangle (unobscured_region, &rect);
|
||||
if (clip_region)
|
||||
cairo_region_subtract_rectangle (clip_region, &rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -712,7 +712,9 @@ if have_profiler
|
||||
'backends/meta-profiler.h',
|
||||
]
|
||||
|
||||
dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces')
|
||||
# sysprof does not export anything more specific than the prefix
|
||||
sysprof_datadir = join_paths(sysprof_dep.get_pkgconfig_variable('prefix'), get_option('datadir'))
|
||||
dbus_interfaces_dir = join_paths(sysprof_datadir, 'dbus-1', 'interfaces')
|
||||
sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml')
|
||||
|
||||
dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler',
|
||||
|
@@ -861,8 +861,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
|
||||
if (icon_name)
|
||||
{
|
||||
GtkIconTheme *theme = gtk_icon_theme_get_default ();
|
||||
GtkIconInfo *info;
|
||||
GdkPixbuf *pixbuf;
|
||||
g_autoptr (GtkIconInfo) info = NULL;
|
||||
g_autoptr (GdkPixbuf) pixbuf = NULL;
|
||||
|
||||
info = gtk_icon_theme_lookup_icon_for_scale (theme, icon_name,
|
||||
layout->icon_size, scale, 0);
|
||||
|
@@ -116,6 +116,7 @@ write_mimetypes_cb (GOutputStream *stream,
|
||||
|
||||
g_output_stream_write_bytes_finish (stream, res, &error);
|
||||
g_output_stream_close (stream, NULL, NULL);
|
||||
g_object_unref (stream);
|
||||
|
||||
if (error)
|
||||
{
|
||||
|
Reference in New Issue
Block a user