File tree Expand file tree Collapse file tree 3 files changed +12
-15
lines changed
src/components/windowsSuggestions Expand file tree Collapse file tree 3 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 1111 " 47"
1212 ],
1313 "version" : 99 ,
14- "version-name" : " 16.0 " ,
14+ "version-name" : " 16.1 " ,
1515 "url" : " https://github.com/domferr/tilingshell" ,
1616 "settings-schema" : " org.gnome.shell.extensions.tilingshell" ,
1717 "gettext-domain" : " tilingshell" ,
Original file line number Diff line number Diff line change @@ -74,8 +74,12 @@ export default class SuggestionsTilePreview extends TilePreview {
7474 x_expand : true ,
7575 y_expand : true ,
7676 } ) ;
77+
7778 // @ts -expect-error "add_actor is valid"
78- this . _scrollView . add_actor ( this . _container ) ;
79+ if ( this . _scrollView . add_actor )
80+ // @ts -expect-error "add_actor is valid"
81+ this . _scrollView . add_actor ( this . _container ) ;
82+ else this . _scrollView . add_child ( this . _container ) ;
7983 this . add_child ( this . _scrollView ) ;
8084
8185 this . _scrollView . get_hscroll_bar ( ) . opacity = 0 ;
Original file line number Diff line number Diff line change @@ -80,19 +80,11 @@ export default class TilingLayoutWithSuggestions extends LayoutWidget<Suggestion
8080
8181 this . _signals . disconnect ( ) ;
8282 this . _signals . connect ( this , 'key-focus-out' , ( ) => this . close ( ) ) ;
83- this . _signals . connect (
84- global . stage ,
85- 'button-press-event' ,
86- ( _ : Clutter . Actor , event : Clutter . Event ) => {
87- const isDescendant = this . contains ( event . get_source ( ) ) ;
88- if (
89- isDescendant &&
90- ( event . get_source ( ) === this ||
91- event . get_source ( ) instanceof St . ScrollView )
92- )
93- this . close ( ) ;
94- } ,
95- ) ;
83+ this . _signals . connect ( this , 'button-press-event' , ( ) => {
84+ // if a window clone is pressed by a button, it will stop propagating the event
85+ // then if this is called it is not a window clone that was pressed
86+ this . close ( ) ;
87+ } ) ;
9688 this . _signals . connect (
9789 global . stage ,
9890 'key-press-event' ,
@@ -251,6 +243,7 @@ export default class TilingLayoutWithSuggestions extends LayoutWidget<Suggestion
251243 nontiledWindows . splice ( nontiledWindows . indexOf ( nonTiledWin ) , 1 ) ;
252244 preview . close ( true ) ;
253245 this . _recursivelyShowPopup ( nontiledWindows , monitorIndex ) ;
246+ return Clutter . EVENT_STOP ; // Blocca la propagazione
254247 } ) ;
255248 return winClone ;
256249 } ) ;
You can’t perform that action at this time.
0 commit comments