@@ -857,7 +857,7 @@ export default class DesktopCube extends Extension {
857857 // Then sort the children actors accordingly.
858858 const parent = actors [ 0 ] . get_parent ( ) ;
859859 for ( let i = 0 ; i < copy . length ; i ++ ) {
860- parent . set_child_at_index ( copy [ i ] , - 1 ) ;
860+ parent . set_child_at_index ( copy [ i ] , i ) ;
861861 }
862862 }
863863
@@ -954,7 +954,7 @@ export default class DesktopCube extends Extension {
954954
955955 // Finally, sort the children actors accordingly.
956956 for ( let i = 0 ; i < copy . length ; i ++ ) {
957- parent . set_child_at_index ( copy [ i ] , - 1 ) ;
957+ parent . set_child_at_index ( copy [ i ] , i ) ;
958958 }
959959 }
960960
@@ -1165,9 +1165,17 @@ export default class DesktopCube extends Extension {
11651165 // SwipeTracker's gesture ends, the St.Adjustment's value will be eased to zero.
11661166 _addDragGesture ( actor , tracker , mode ) {
11671167 const gesture = new DragGesture ( actor , mode ) ;
1168- gesture . connect ( 'begin' , tracker . _beginGesture . bind ( tracker ) ) ;
1169- gesture . connect ( 'update' , tracker . _updateGesture . bind ( tracker ) ) ;
1170- gesture . connect ( 'end' , tracker . _endTouchGesture . bind ( tracker ) ) ;
1168+
1169+ if ( utils . shellVersionIsAtLeast ( 49 , "beta" ) ) {
1170+ gesture . connect ( 'begin' , tracker . _beginTouchpadGesture . bind ( tracker ) ) ;
1171+ gesture . connect ( 'update' , tracker . _updateTouchpadGesture . bind ( tracker ) ) ;
1172+ gesture . connect ( 'end' , tracker . _endTouchpadGesture . bind ( tracker ) ) ;
1173+ } else {
1174+ gesture . connect ( 'begin' , tracker . _beginGesture . bind ( tracker ) ) ;
1175+ gesture . connect ( 'update' , tracker . _updateGesture . bind ( tracker ) ) ;
1176+ gesture . connect ( 'end' , tracker . _endTouchGesture . bind ( tracker ) ) ;
1177+ }
1178+
11711179 tracker . bind_property ( 'distance' , gesture , 'distance' ,
11721180 GObject . BindingFlags . SYNC_CREATE ) ;
11731181
0 commit comments