File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,16 @@ export const WindowGeometry = GObject.registerClass({
238238 this . notify ( 'pivot-point' ) ;
239239 }
240240
241+ _swap_window_sizes ( ) {
242+ var hsize = this . window_hsize ;
243+ this . window_hsize = this . window_vsize ;
244+ this . window_vsize = hsize ;
245+ // TODO: Is this right?
246+ this . notify ( 'window-hsize' ) ;
247+ this . notify ( 'window-vsize' ) ;
248+ this . notify ( 'target-rect' ) ;
249+ }
250+
241251 _set_orientation ( new_orientation ) {
242252 if ( this . _orientation === new_orientation )
243253 return ;
@@ -320,12 +330,18 @@ export const WindowGeometry = GObject.registerClass({
320330 switch ( this . window_position ) {
321331 case Meta . Side . LEFT :
322332 case Meta . Side . RIGHT :
333+ if ( this . _orientation !== Clutter . Orientation . HORIZONTAL )
334+ this . _swap_window_sizes ( ) ;
335+
323336 this . _set_orientation ( Clutter . Orientation . HORIZONTAL ) ;
324337 this . _set_maximize_flag ( Meta . MaximizeFlags . HORIZONTAL ) ;
325338 break ;
326339
327340 case Meta . Side . TOP :
328341 case Meta . Side . BOTTOM :
342+ if ( this . _orientation !== Clutter . Orientation . VERTICAL )
343+ this . _swap_window_sizes ( ) ;
344+
329345 this . _set_orientation ( Clutter . Orientation . VERTICAL ) ;
330346 this . _set_maximize_flag ( Meta . MaximizeFlags . VERTICAL ) ;
331347 }
You can’t perform that action at this time.
0 commit comments