代码拉取完成,页面将自动刷新
同步操作将从 src-oepkgs/gala 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9f68e58ca39d8a1416d1340e09718cf756d36a9f Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 27 Aug 2020 15:11:43 +0200
Subject: [PATCH 3/8] adapt to mutter 3.38 API changes
---
lib/Plugin.vala | 12 ++++++++++++
src/Widgets/WindowClone.vala | 17 +++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/lib/Plugin.vala b/lib/Plugin.vala
index 1b3e95f..039df11 100644
--- a/lib/Plugin.vala
+++ b/lib/Plugin.vala
@@ -149,7 +149,11 @@ namespace Gala {
*/
public void track_actor (Clutter.Actor actor) {
tracked_actors.prepend (actor);
+#if HAS_MUTTER338
+ actor.notify["allocation"].connect (on_actor_allocation_changed);
+#else
actor.allocation_changed.connect (actor_allocation_changed);
+#endif
update_region ();
}
@@ -162,7 +166,11 @@ namespace Gala {
*/
public void untrack_actor (Clutter.Actor actor) {
tracked_actors.remove (actor);
+#if HAS_MUTTER338
+ actor.notify["allocation"].disconnect (on_actor_allocation_changed);
+#else
actor.allocation_changed.disconnect (actor_allocation_changed);
+#endif
}
/**
@@ -202,7 +210,11 @@ namespace Gala {
region_changed ();
}
+#if HAS_MUTTER338
+ private void on_actor_allocation_changed (GLib.Object actor_object, GLib.ParamSpec pspec) {
+#else
private void actor_allocation_changed (Clutter.ActorBox box, Clutter.AllocationFlags f) {
+#endif
if (!freeze_track)
update_region ();
}
diff --git a/src/Widgets/WindowClone.vala b/src/Widgets/WindowClone.vala
index efec6ff..770275d 100644
--- a/src/Widgets/WindowClone.vala
+++ b/src/Widgets/WindowClone.vala
@@ -341,12 +341,21 @@ namespace Gala {
* according to their given allocations. The first two are placed in a way
* that compensates for invisible borders of the texture.
*/
+#if HAS_MUTTER338
+ public override void allocate (ActorBox box) {
+ base.allocate (box);
+#else
public override void allocate (ActorBox box, AllocationFlags flags) {
base.allocate (box, flags);
+#endif
foreach (var child in get_children ()) {
if (child != clone && child != active_shape)
+#if HAS_MUTTER338
+ child.allocate_preferred_size ();
+#else
child.allocate_preferred_size (flags);
+#endif
}
ActorBox shape_alloc = {
@@ -355,7 +364,11 @@ namespace Gala {
box.get_width () + ACTIVE_SHAPE_SIZE,
box.get_height () + ACTIVE_SHAPE_SIZE
};
+#if HAS_MUTTER338
+ active_shape.allocate (shape_alloc);
+#else
active_shape.allocate (shape_alloc, flags);
+#endif
if (clone == null || dragging)
return;
@@ -370,7 +383,11 @@ namespace Gala {
(input_rect.y - outer_rect.y) * scale_factor);
alloc.set_size (actor.width * scale_factor, actor.height * scale_factor);
+#if HAS_MUTTER338
+ clone.allocate (alloc);
+#else
clone.allocate (alloc, flags);
+#endif
}
public override bool button_press_event (Clutter.ButtonEvent event) {
--
2.26.2
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。