コード例 #1
0
ファイル: x11_server_core.py プロジェクト: chewi/xpra
 def do_cleanup(self):
     log("do_cleanup() x11_filter=%s", self.x11_filter)
     if self.x11_filter:
         self.x11_filter = False
         cleanup_x11_filter()
         #try a few times:
         #errors happen because windows are being destroyed
         #(even more so when we cleanup)
         #and we don't really care too much about this
         for l in (log, log, log, log, log.warn):
             try:
                 with xsync:
                     cleanup_all_event_receivers()
                     #all went well, we're done
                     log("all event receivers have been removed")
                     break
             except Exception as e:
                 l("failed to remove event receivers: %s", e)
     if self.fake_xinerama:
         cleanup_fakeXinerama()
     with xlog:
         clean_keyboard_state()
     #prop_del does its own xsync:
     self.clean_x11_properties()
     super().do_cleanup()
     log("close_gdk_display_source()")
     close_gdk_display_source()
コード例 #2
0
ファイル: fakexinerama_test.py プロジェクト: gitmirrors2/xpra
    def test_config(self):
        from xpra.x11.fakeXinerama import save_fakeXinerama_config, cleanup_fakeXinerama, log
        #silence warnings during tests:
        log.warn = log.debug

        def get_display_info(*monitors):
            #display_name, width, height, width_mm, height_mm, \
            #monitors, work_x, work_y, work_width, work_height = s[:11]
            return (
                "fake-display",
                1920,
                1080,
                400,
                300,
                monitors,
                0,
                60,
                1920,
                1020,
            )

        monitor0 = ("plug0", 0, 0, 1920, 1080, 400, 300)
        monitor1 = ("plug1", 1920, 0, 1920, 1080, 300, 200)
        for ss in (
                get_display_info(),
                get_display_info((0, 0)),
                get_display_info(monitor0),
                get_display_info(monitor0, monitor1),
            (800, 600),
            (1, 2, 3, 4, 5),
        ):
            save_fakeXinerama_config(True, "", (ss, ))
            cleanup_fakeXinerama()
コード例 #3
0
ファイル: x11_server_core.py プロジェクト: DiGuoZhiMeng/Xpra
 def do_cleanup(self):
     if self.x11_filter:
         self.x11_filter = False
         cleanup_x11_filter()
         #try a few times:
         #errors happen because windows are being destroyed
         #(even more so when we cleanup)
         #and we don't really care too much about this
         for l in (log, log, log, log, log.warn):
             try:
                 with xsync:
                     cleanup_all_event_receivers()
                     #all went well, we're done
                     break
             except Exception as e:
                 l("failed to remove event receivers: %s", e)
     if self.fake_xinerama:
         cleanup_fakeXinerama()
     with xswallow:
         clean_keyboard_state()
     GTKServerBase.do_cleanup(self)
     log("close_gdk_display_source()")
     close_gdk_display_source()
コード例 #4
0
 def do_cleanup(self):
     GTKServerBase.do_cleanup(self)
     if self.fake_xinerama:
         cleanup_fakeXinerama()
     with xswallow:
         clean_keyboard_state()
コード例 #5
0
 def test_config(self):
     from xpra.x11.fakeXinerama import save_fakeXinerama_config, cleanup_fakeXinerama
     ss = ()
     save_fakeXinerama_config(True, "", ss)
     cleanup_fakeXinerama()
コード例 #6
0
 def do_cleanup(self, *args):
     GTKServerBase.do_cleanup(self)
     cleanup_fakeXinerama()
コード例 #7
0
ファイル: x11_server_base.py プロジェクト: svn2github/Xpra
 def do_cleanup(self, *args):
     GTKServerBase.do_cleanup(self)
     cleanup_fakeXinerama()
コード例 #8
0
 def do_cleanup(self, *args):
     GTKServerBase.do_cleanup(self)
     cleanup_fakeXinerama()
     self.cleanup_input_devices()