@@ -456,8 +456,7 @@ public class Gala.WindowClone : Clutter.Actor {
456456 float clone_x = (input_rect. x - outer_rect. x) * clone_scale_factor;
457457 float clone_y = (input_rect. y - outer_rect. y) * clone_scale_factor;
458458
459- var clone_alloc = Clutter . ActorBox ();
460- clone_alloc. init_rect (clone_x, clone_y, clone_width, clone_height);
459+ var clone_alloc = InternalUtils . actor_box_from_rect (clone_x, clone_y, clone_width, clone_height);
461460 clone. allocate (clone_alloc);
462461
463462 Clutter . ActorBox shape_alloc = {
@@ -466,6 +465,7 @@ public class Gala.WindowClone : Clutter.Actor {
466465 box. get_width () + ACTIVE_SHAPE_SIZE ,
467466 box. get_height () + ACTIVE_SHAPE_SIZE
468467 };
468+ Clutter . ActorBox . clamp_to_pixel (ref shape_alloc);
469469 active_shape. allocate (shape_alloc);
470470
471471 float close_button_width, close_button_height;
@@ -474,8 +474,7 @@ public class Gala.WindowClone : Clutter.Actor {
474474 var close_button_x = is_close_button_on_left () ?
475475 - close_button_width * 0.5f : box. get_width () - close_button_width * 0.5f ;
476476
477- var close_button_alloc = Clutter . ActorBox ();
478- close_button_alloc. init_rect (close_button_x, - close_button_height * 0.33f , close_button_width, close_button_height);
477+ var close_button_alloc = InternalUtils . actor_box_from_rect (close_button_x, - close_button_height * 0.33f , close_button_width, close_button_height);
479478 close_button. allocate (close_button_alloc);
480479
481480 var monitor_index = wm. get_display (). get_monitor_index_for_rect ({ (int ) box. get_x (), (int ) box. get_y (), (int ) box. get_width (), (int ) box. get_height ()});
@@ -490,8 +489,7 @@ public class Gala.WindowClone : Clutter.Actor {
490489 float window_title_x = (box. get_width () - window_title_width) / 2 ;
491490 float window_title_y = box. get_height () - InternalUtils . scale_to_int (WINDOW_ICON_SIZE , monitor_scale) * 0.75f - (window_title_height / 2 ) - InternalUtils . scale_to_int (18 , monitor_scale);
492491
493- var window_title_alloc = Clutter . ActorBox ();
494- window_title_alloc. init_rect (window_title_x, window_title_y, window_title_width, window_title_height);
492+ var window_title_alloc = InternalUtils . actor_box_from_rect (window_title_x, window_title_y, window_title_width, window_title_height);
495493 window_title. allocate (window_title_alloc);
496494 }
497495
0 commit comments