File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 66
77'use strict' ;
88
9+ imports . gi . versions . Gdk = '4.0' ;
910imports . gi . versions . Gtk = '4.0' ;
1011
11- const { GObject, Gio, Gtk } = imports . gi ;
12+ const { GObject, Gio, Gdk , Gtk } = imports . gi ;
1213
1314const System = imports . system ;
1415
@@ -19,6 +20,8 @@ const Application = GObject.registerClass({
1920
2021 this . connect ( 'startup' , this . startup . bind ( this ) ) ;
2122 this . connect ( 'activate' , this . activate . bind ( this ) ) ;
23+
24+ Gdk . set_allowed_backends ( 'x11' ) ;
2225 }
2326
2427 startup ( ) {
Original file line number Diff line number Diff line change @@ -457,6 +457,19 @@ def shell_init(
457457 shell_test_hook .SetPointer (pointer_x , center_y )
458458 shell_test_hook .SetPointer (center_x , center_y )
459459
460+ @pytest .fixture (scope = 'class' )
461+ def shell_env (
462+ self ,
463+ shell_init ,
464+ shell_test_hook
465+ ):
466+ shell_environ = shell_test_hook .Eval ('imports.gi.GLib.get_environ()' )
467+
468+ return {
469+ k : v for k , _ , v in
470+ (entry .partition ('=' ) for entry in shell_environ )
471+ }
472+
460473 @pytest .fixture (scope = 'class' )
461474 def extension_init (self , shell_init , shell_extensions_dbus_interface ):
462475 return shell_extensions_dbus_interface .EnableExtension ('ddterm@amezin.github.com' )
@@ -592,13 +605,14 @@ def dummy_app(
592605 process_launcher ,
593606 dbus_connection ,
594607 shell_test_hook ,
608+ shell_env ,
595609 hide_overview ,
596610 pytestconfig ,
597611 ):
598612 with process_launcher .spawn (
599613 str (pytestconfig .option .gjs ),
600614 str (THIS_DIR / 'dummy-app.js' ),
601- env = dbus_environment ,
615+ env = shell_env ,
602616 ) as proc :
603617 try :
604618 shell_test_hook .wait_property ('FocusApp' , 'com.github.ddterm.DummyApp' )
You can’t perform that action at this time.
0 commit comments