@@ -255,36 +255,6 @@ def monitor_config(
255255
256256 return monitor_layout
257257
258- @pytest .fixture
259- def gdk_backend (
260- self ,
261- request ,
262- dbus_connection ,
263- extension_test_hook ,
264- settings_test_hook ,
265- app_dbus_actions
266- ):
267- force_x11 = request .param == GdkBackend .X11
268-
269- # Make sure cached value is up to date
270- glibutil .dispatch_pending_sources ()
271-
272- if settings_test_hook .force_x11_gdk_backend == force_x11 :
273- return request .param
274-
275- settings_test_hook .force_x11_gdk_backend = force_x11
276-
277- if extension_test_hook .AppRunning :
278- app_dbus_actions .activate_action ('quit' , None )
279-
280- extension_test_hook .wait_property (
281- 'AppRunning' ,
282- False ,
283- timeout = dbusutil .DEFAULT_LONG_TIMEOUT_MS
284- )
285-
286- return request .param
287-
288258 @pytest .fixture
289259 def window_size (self , settings_test_hook , request ):
290260 settings_test_hook .window_size = request .param
@@ -447,12 +417,14 @@ def test_show(
447417 extension_test_hook ,
448418 shell_test_hook ,
449419 wait_idle ,
420+ gdk_backend ,
450421 ):
451422 extension_dbus_interface .Activate (timeout = dbusutil .DEFAULT_LONG_TIMEOUT_MS )
452423 glibutil .dispatch_pending_sources ()
453424
454425 assert extension_test_hook .HasWindow
455426 assert unmaximized_rect == extension_dbus_interface .TargetRect
427+ assert extension_test_hook .ClientType == gdk_backend
456428
457429 extension_test_hook .wait_property ('RenderedFirstFrame' , True )
458430 wait_idle ()
@@ -533,12 +505,14 @@ def test_maximize_unmaximize(
533505 settings_test_hook ,
534506 shell_test_hook ,
535507 wait_idle ,
508+ gdk_backend ,
536509 ):
537510 extension_dbus_interface .Activate (timeout = dbusutil .DEFAULT_LONG_TIMEOUT_MS )
538511 glibutil .dispatch_pending_sources ()
539512
540513 assert extension_test_hook .HasWindow
541514 assert unmaximized_rect == extension_dbus_interface .TargetRect
515+ assert extension_test_hook .ClientType == gdk_backend
542516
543517 extension_test_hook .wait_property ('RenderedFirstFrame' , True )
544518 wait_idle ()
@@ -584,12 +558,14 @@ def test_mouse_resize(
584558 extension_test_hook ,
585559 shell_test_hook ,
586560 wait_idle ,
561+ gdk_backend ,
587562 ):
588563 extension_dbus_interface .Activate (timeout = dbusutil .DEFAULT_LONG_TIMEOUT_MS )
589564 glibutil .dispatch_pending_sources ()
590565
591566 assert extension_test_hook .HasWindow
592567 assert unmaximized_rect == extension_dbus_interface .TargetRect
568+ assert extension_test_hook .ClientType == gdk_backend
593569
594570 extension_test_hook .wait_property ('RenderedFirstFrame' , True )
595571 wait_idle ()
@@ -642,6 +618,7 @@ def test_resize_maximize_unmaximize(
642618 settings_test_hook ,
643619 shell_test_hook ,
644620 wait_idle ,
621+ gdk_backend ,
645622 ):
646623 settings_test_hook .window_maximize = False
647624
@@ -650,6 +627,7 @@ def test_resize_maximize_unmaximize(
650627
651628 assert extension_test_hook .HasWindow
652629 assert unmaximized_rect == extension_dbus_interface .TargetRect
630+ assert extension_test_hook .ClientType == gdk_backend
653631
654632 wait_idle ()
655633
@@ -737,6 +715,12 @@ def monitor_layout(self, layout_mode, monitor0_scale, monitor1_scale):
737715
738716 return (displayconfig .SimpleMonitorConfig (scale = monitor0_scale ),)
739717
718+ @pytest .fixture
719+ def gdk_backend (self , request ):
720+ assert request .param == GdkBackend .X11
721+
722+ return request .param
723+
740724
741725class TestWayland (CommonTests , fixtures .GnomeSessionWaylandFixtures ):
742726 @pytest .fixture
@@ -759,6 +743,36 @@ def expected_show_transitions(
759743
760744 return animation_mode .expected_transitions (window_position )
761745
746+ @pytest .fixture
747+ def gdk_backend (
748+ self ,
749+ request ,
750+ dbus_connection ,
751+ extension_test_hook ,
752+ settings_test_hook ,
753+ app_dbus_actions
754+ ):
755+ force_x11 = request .param == GdkBackend .X11
756+
757+ # Make sure cached value is up to date
758+ glibutil .dispatch_pending_sources ()
759+
760+ if settings_test_hook .force_x11_gdk_backend == force_x11 :
761+ return request .param
762+
763+ if extension_test_hook .AppRunning :
764+ app_dbus_actions .activate_action ('quit' , None )
765+
766+ extension_test_hook .wait_property (
767+ 'AppRunning' ,
768+ False ,
769+ timeout = dbusutil .DEFAULT_LONG_TIMEOUT_MS
770+ )
771+
772+ settings_test_hook .force_x11_gdk_backend = force_x11
773+
774+ return request .param
775+
762776
763777class TestWaylandTwoMonitors (TestWayland ):
764778 @pytest .fixture
0 commit comments