@@ -1789,14 +1789,24 @@ export class Ext extends Ecs.System<ExtEvent> {
1789
1789
this . register ( { tag : 3 , window } ) ;
1790
1790
} ) ;
1791
1791
1792
- this . connect ( display , 'grab-op-begin' , ( _ , _display , win , op ) => {
1793
- this . on_grab_start ( win , op ) ;
1794
- } ) ;
1792
+ if ( GNOME_VERSION ?. startsWith ( "3." ) ) {
1793
+ // GNOME 40 removed the first argument of the callback
1794
+ this . connect ( display , 'grab-op-begin' , ( _ , _display , win , op ) => {
1795
+ this . on_grab_start ( win , op ) ;
1796
+ } ) ;
1795
1797
1796
- this . connect ( display , 'grab-op-end' , ( _ , _display , win , op ) => {
1797
- this . register_fn ( ( ) => this . on_grab_end ( win , op ) ) ;
1798
+ this . connect ( display , 'grab-op-end' , ( _ , _display , win , op ) => {
1799
+ this . register_fn ( ( ) => this . on_grab_end ( win , op ) ) ;
1800
+ } ) ;
1801
+ } else {
1802
+ this . connect ( display , 'grab-op-begin' , ( _display , win , op ) => {
1803
+ this . on_grab_start ( win , op ) ;
1804
+ } ) ;
1798
1805
1799
- } ) ;
1806
+ this . connect ( display , 'grab-op-end' , ( _display , win , op ) => {
1807
+ this . register_fn ( ( ) => this . on_grab_end ( win , op ) ) ;
1808
+ } ) ;
1809
+ }
1800
1810
1801
1811
this . connect ( overview , 'window-drag-begin' , ( _ , win ) => {
1802
1812
this . on_grab_start ( win , 1 )
0 commit comments