From b5b297e6b4f2ee61bcd6fa4e7d2b38410082ec36 Mon Sep 17 00:00:00 2001 From: lenemter Date: Sun, 23 Jun 2024 15:47:49 +0900 Subject: [PATCH 1/3] Canvas: discard bitmap on invalidate --- lib/Drawing/Canvas.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Drawing/Canvas.vala b/lib/Drawing/Canvas.vala index 3d8f1f6e..9d49bc1e 100644 --- a/lib/Drawing/Canvas.vala +++ b/lib/Drawing/Canvas.vala @@ -69,7 +69,9 @@ public class Gala.Drawing.Canvas : GLib.Object, Clutter.Content { } public void invalidate () { - if (width <= 0 || height <= 0) { + bitmap = null; + + if (width <= 0 || height <= 0) { return; } From 9205df5bb293d31e0b3428ce79f73e95d832af58 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 23 Jun 2024 19:23:28 +0900 Subject: [PATCH 2/3] Manually set ui_group size (#1953) Co-authored-by: Leonhard <106322251+leolost2605@users.noreply.github.com> Co-authored-by: Leonhard Kargl --- src/WindowManager.vala | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index b6c87ad2..707d1e6f 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -217,6 +217,7 @@ namespace Gala { ui_group = new Clutter.Actor (); ui_group.reactive = true; + update_ui_group_size (); stage.add_child (ui_group); window_group = display.get_window_group (); @@ -380,6 +381,25 @@ namespace Gala { return false; } + private void update_ui_group_size () { + unowned var display = get_display (); + + int max_width = 0; + int max_height = 0; + + var num_monitors = display.get_n_monitors (); + for (int i = 0; i < num_monitors; i++) { + var geom = display.get_monitor_geometry (i); + var total_width = geom.x + geom.width; + var total_height = geom.y + geom.height; + + max_width = (max_width > total_width) ? max_width : total_width; + max_height = (max_height > total_height) ? max_height : total_height; + } + + ui_group.set_size (max_width, max_height); + } + private void launch_action (string action_key) { try { var action = behavior_settings.get_string (action_key); @@ -390,6 +410,7 @@ namespace Gala { } private void on_monitors_changed () { + update_ui_group_size (); screen_shield.expand_to_screen_size (); } From 6dd497e98f31fa8e841d36a9029180b4081443a7 Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Sun, 23 Jun 2024 12:25:09 +0200 Subject: [PATCH 3/3] Fix indentation (#1955) Co-authored-by: Leo --- lib/Drawing/Canvas.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Drawing/Canvas.vala b/lib/Drawing/Canvas.vala index 9d49bc1e..e629d38f 100644 --- a/lib/Drawing/Canvas.vala +++ b/lib/Drawing/Canvas.vala @@ -69,9 +69,9 @@ public class Gala.Drawing.Canvas : GLib.Object, Clutter.Content { } public void invalidate () { - bitmap = null; + bitmap = null; - if (width <= 0 || height <= 0) { + if (width <= 0 || height <= 0) { return; }