Ejemplo n.º 1
0
 def __init__(self):
     GTKShadowServerBase.__init__(self)
     self.keycodes = {}
     self.cursor_handle = None
     self.cursor_data = None
     if GetSystemMetrics(win32con.SM_SAMEDISPLAYFORMAT) == 0:
         raise InitException(
             "all the monitors must use the same display format")
     el = get_win32_event_listener()
     from xpra.net.bytestreams import set_continue_wait
     #on win32, we want to wait just a little while,
     #to prevent servers spinning wildly on non-blocking sockets:
     set_continue_wait(5)
     #TODO: deal with those messages?
     el.add_event_callback(win32con.WM_POWERBROADCAST,
                           self.power_broadcast_event)
     #el.add_event_callback(WM_WTSSESSION_CHANGE,         self.session_change_event)
     #these are bound to callbacks in the client,
     #but on the server we just ignore them:
     el.ignore_events.update({
         win32con.WM_ACTIVATEAPP: "WM_ACTIVATEAPP",
         win32con.WM_MOVE: "WM_MOVE",
         win32con.WM_INPUTLANGCHANGE: "WM_INPUTLANGCHANGE",
         win32con.WM_WININICHANGE: "WM_WININICHANGE",
     })
     #non-blocking server sockets (TCP and named pipes):
     from xpra.net.bytestreams import CONTINUE_ERRNO
     import errno
     CONTINUE_ERRNO[
         errno.WSAEWOULDBLOCK] = "WSAEWOULDBLOCK"  #@UndefinedVariable
Ejemplo n.º 2
0
 def __init__(self):
     GTKShadowServerBase.__init__(self)
     self.keycodes = {}
     from xpra.net.bytestreams import set_continue_wait
     #on win32, we want to wait just a little while,
     #to prevent servers spinning wildly on non-blocking sockets:
     set_continue_wait(5)
Ejemplo n.º 3
0
 def __init__(self):
     GTKShadowServerBase.__init__(self)
     self.keycodes = {}
     el = get_win32_event_listener()
     from xpra.net.bytestreams import set_continue_wait
     #on win32, we want to wait just a little while,
     #to prevent servers spinning wildly on non-blocking sockets:
     set_continue_wait(5)
     #TODO: deal with those messages?
     #el.add_event_callback(win32con.WM_POWERBROADCAST,   self.power_broadcast_event)
     #el.add_event_callback(WM_WTSSESSION_CHANGE,         self.session_change_event)
     #these are bound to callbacks in the client,
     #but on the server we just ignore them:
     el.ignore_events.update({
         win32con.WM_ACTIVATEAPP: "WM_ACTIVATEAPP",
         win32con.WM_MOVE: "WM_MOVE",
         win32con.WM_INPUTLANGCHANGE: "WM_INPUTLANGCHANGE",
         win32con.WM_WININICHANGE: "WM_WININICHANGE",
     })