Skip to content

Commit

Permalink
#3957 use non-blocking select and add test tool
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Dec 31, 2023
1 parent cf836d9 commit 7e06563
Show file tree
Hide file tree
Showing 6 changed files with 558 additions and 49 deletions.
8 changes: 3 additions & 5 deletions xpra/x11/bindings/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ from xpra.x11.bindings.display_source cimport get_display
from xpra.x11.bindings.display_source import get_display_name

cdef X11CoreBindingsInstance singleton = None


def X11CoreBindings():
global singleton
if singleton is None:
Expand Down Expand Up @@ -59,8 +61,7 @@ cdef class X11CoreBindingsInstance:
self.display = get_display()
if self.display == NULL:
raise RuntimeError("X11 display is not set")
dn = get_display_name()
bstr = strtobytes(dn)
bstr = strtobytes(get_display_name())
self.display_name = bstr
self.XSynchronize(envbool("XPRA_X_SYNC", False))

Expand All @@ -77,9 +78,6 @@ cdef class X11CoreBindingsInstance:
global context_check
context_check(*args)

def get_display_name(self):
return self.display_name

def __repr__(self):
return "X11CoreBindings(%s)" % self.display_name

Expand Down
2 changes: 1 addition & 1 deletion xpra/x11/bindings/display_source.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ cdef extern from "X11/Xlib.h":
ctypedef struct Display:
pass

cdef Display* get_display()
cdef Display* get_display() noexcept
cdef int set_display(Display *d) except 1
2 changes: 1 addition & 1 deletion xpra/x11/bindings/display_source.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cdef Display *display = NULL
display_name = ""


cdef Display* get_display():
cdef Display* get_display() noexcept:
return display


Expand Down
Loading

0 comments on commit 7e06563

Please sign in to comment.