@@ -35,6 +35,9 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
3535 private GestureController workspace_gesture_controller;
3636 private WorkspaceHideTracker workspace_hide_tracker;
3737
38+ private int width = - 1 ;
39+ private int height = - 1 ;
40+
3841 public PanelWindow (WindowManager wm, Meta . Window window, Pantheon . Desktop . Anchor anchor) {
3942 Object (wm: wm, anchor: anchor, window: window, position: Position . from_anchor (anchor));
4043 }
@@ -86,6 +89,30 @@ public class Gala.PanelWindow : ShellWindow, RootTarget {
8689 notify[" position" ]. connect (update_clip);
8790 }
8891
92+ public Mtk . Rectangle get_custom_window_rect () {
93+ var window_rect = window. get_frame_rect ();
94+
95+ if (width > 0 ) {
96+ window_rect. width = width;
97+ }
98+
99+ if (height > 0 ) {
100+ window_rect. height = height;
101+
102+ if (position == BOTTOM ) {
103+ var geom = window. display. get_monitor_geometry (window. get_monitor ());
104+ window_rect. y = geom. y + geom. height - height;
105+ }
106+ }
107+
108+ return window_rect;
109+ }
110+
111+ public void set_size (int width, int height) {
112+ this . width = width;
113+ this . height = height;
114+ }
115+
89116 public void request_visible_in_multitasking_view () {
90117 visible_in_multitasking_view = true ;
91118 actor. add_action (new DragDropAction (DESTINATION , " multitaskingview-window" ));
0 commit comments