@@ -32,6 +32,9 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
3232 private GestureController gesture_controller;
3333 private HideTracker hide_tracker;
3434
35+ private int width = - 1 ;
36+ private int height = - 1 ;
37+
3538 public PanelWindow (WindowManager wm, Meta . Window window, Pantheon . Desktop . Anchor anchor) {
3639 Object (wm: wm, anchor: anchor, window: window, position: Position . from_anchor (anchor));
3740 }
@@ -73,6 +76,30 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
7376 notify[" position" ]. connect (update_clip);
7477 }
7578
79+ public Mtk . Rectangle get_custom_window_rect () {
80+ var window_rect = window. get_frame_rect ();
81+
82+ if (width > 0 ) {
83+ window_rect. width = width;
84+ }
85+
86+ if (height > 0 ) {
87+ window_rect. height = height;
88+
89+ if (position == BOTTOM ) {
90+ var geom = window. display. get_monitor_geometry (window. get_monitor ());
91+ window_rect. y = geom. y + geom. height - height;
92+ }
93+ }
94+
95+ return window_rect;
96+ }
97+
98+ public void set_size (int width, int height) {
99+ this . width = width;
100+ this . height = height;
101+ }
102+
76103 public void request_visible_in_multitasking_view () {
77104 visible_in_multitasking_view = true ;
78105 actor. add_action (new DragDropAction (DESTINATION , " multitaskingview-window" ));
0 commit comments